Contact us |
Third party tools
One of the good things about most of the tools is that they automatically take care of issues of package/library dependencies. The tools usually have a database of some sort that they consult to know what package depends on what and also where to get the required package from. Sometimes all that you need to know is the name of the package that you want (some of the tools will not even require you to know the exact package name - only a part of it from which the exact name can be searched). One particularly very popular tool is called "yum". It is a wrapper program for RPM and can help to automatically manage rpm software on your Fedora Core system. To illustrate, we will first un-install the package (libidn) that curl depends on and then we'll un-install curl itself using the rpm command from the command-line. We will then attempt to use yum to re-install curl. It will be observed how "yum" will quietly take care of the dependency issues of curl. Common options used with the yum utility are: yum usage syntax: Usage: yum options < update | install | info | remove | list | clean | provides | search | check-update | groupinstall | groupupdate | grouplist | groupinfo | groupremove | makecache | localinstall | shell > Options: -c config file - specify the config file to use -e error level - set the error logging level -d debug level - set the debugging level -y - answer yes to all questions -R time in minutes - set the max amount of time to randomly run in -C run from cache only - do not update the cache --installroot=path - set the install root (default '/') --version - output the version of yum --exclude=package to exclude --disablerepo=repository id to disable (overrides config file) --enablerepo=repository id to enable (overrides config file) To use yum 1. First remove the libidn package that was installed in the preceding exercises. Type:: root@localhost root# rpm -e libidn error: Failed dependencies: libidn.so.11 is needed by (installed) curl-7.13.1-3.i386 Just as we expected. We'll just remove both packages at the same time. 2. Un-install curl and libidn at the same time. Type: root@localhost ~# rpm -e libidn curl error: Failed dependencies: libcurl.so.3 is needed by (installed) openoffice.org-core-1.9.104-2.i386 curl is needed by (installed) openoffice.org-core-1.9.104-2.i386 It looks like removing curl and libidn will break the openoffice.or-core package. Fine - we don’t care we have "yum" to fix things for us. 3. Forcefully remove the packages using the --nodeps option of the rpm command. Type: root@localhost ~# rpm -e --nodeps libidn curl 4. Now use yum to re-install curl. Type: root@localhost ~# yum install curl Setting up Install Process Setting up repositories updates-released 100% |======================| 951 B 00:01 Reading repository metadata in from local files primary.xml.gz 100% |===================| 336 kB 01:25 updates-re: ############################################### 917/917 ……<OUTPUT TRUNCATED>……… Dependencies Resolved =============================================== Package Arch Version Repository Size =============================================== Installing: curl i386 7.13.1-3 base 262 k Installing for dependencies: libidn i386 0.5.15-1 base 176 k Transaction Summary ================================================== Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 439 k Is this ok y/N: y ………… Type "y" to install the packages. NOTES: i. The first time that yum is run, it will take a moment to setup itself for the repositories it is configured to use. By default yum consults package repositories that are out on the internet and that is why it might take a minute the first time. But after that first time subsequent use of command runs much faster. ii. yum is very flexible. You can even configure your own local repositories for it to use. You can for example copy the entire contents of the FC4 DVD-ROM or CDROM into a directory on your filesystem and yumify the directory, and then configure yum to also use that directory. Yumifying a directory can be as simple as running the "yum-arch" command against the directory containing the entire "*.rpm" packages (e.g. /path/to/where_ever/your/packages/are/located). Yum's main configuration file is the /etc/yum.conf file. 5. To check if there are any updates for the packages you currently have installed on your system. Type: root@localhost ~# yum check-update 6. To update the entire packages installed on your system to the most up-to-date versions available for your distribution, you can use yum with the update option. Type: root@localhost ~# yum update We don't want to update the packages installed at this time, so type "N" when prompted. 7. To use yum to un-install the curl package install above type: root@localhost ~# yum -y remove curl The "-y" option used in the preceding command suppresses the "y/N" prompt to confirm the action that yum is about to perform. Instead it automatically assumes "yes" (y) for whatever action. 8. Enjoy.
|
Login... |
||||