CAFE

UNIX

RPM options

작성자Luke|작성시간06.07.18|조회수67 목록 댓글 0

Querying Your System

The first thing you should do is look and see what software you have installed on your system. Here is the command to use:

	rpm -qa | more

Installing New Software

Lets look at the command to add new software:

	rpm -ivh xsnow-1.40-5.i386.rpm

 

A variation on an install is an upgrade.  

	rpm -Uvh xsnow-2.0-1.i386.rpm

Removing Unwanted Software

A major advantage to a packaging system like rpm is its ease to erase software. Here is how you do it:
	rpm -e faq

 

There isn't much more to it. Occationally there may be an error that the package cannot be removed because other software depends on it. We can avoid the dependency check with the --nodeps option.

	rpm -e --nodeps faq
I should warn you to think before you do this. Rpm has been smarter than me many times. If you break something, all I can say is you were told so. :-)

Verifying Installed Packages

	rpm -Va

Advanced Queries

What if you find a file and have no idea what it is or where it came from? Rpm can query that file and show you the package it originated from like this:

	rpm -qf /usr/bin/uptime

T

his command is a little different because it requires the full pathname. Rpm cannot follow symbolic links to a file.

You have looked at files that are already installed, but can you see into a rpm archive? Yes, query with the p option.

	rpm -qlp doom-1.8-9.i386.rpm

 

Notice the -ql is the same as the first section. The third arguement to the command is a little different than before. We used the filename instead of the shorter package name. That is because we are looking into a file, not something that has already been installed.

Common Errors

Sometimes a package is not removed cleanly. Here is the situation, you try to install something and rpm says its already installed. You then try to remove it, and rpm says that is not installed. What can you do?
	rpm -ivh --force package-1.0-5.i386.rpm
The --force option is your solution.

 

Dependencies are generally regarded as a good thing. Rpm has the capability to know if software has such prerequisites. In the real world, not everything on your system can always be from an rpm. If I install the new libxxx without rpm, then I install a rpm which depends on libxxx, it might cause an error and stop. I can use the --nodeps to tell rpm that I don't need it to look out for me.

	rpm -ivh --nodeps package-1.0-5.i386.rpm
다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼