For which specific file rpm search first when any one fire command
rpm -e package_name
Check the package name using,
rpm -q package_name
you will find out which packages getting removed.
Related
I would like to find difference between installed xyz-1.0.rpm & latest available xyz-1.1.rpm on repository. Also would like to find out any file change happened in new rpm. How can I do that?
please help.
Thanks
check the changelog
You can check the changelog file:
make sure that you have the package yum-plugin-changelog
and then you can use this command to print the last (most recent) changelog message for the xyz package
# yum changelog 1 xyz | less
otherwise you can use rpm:
# rpm -q --changelog -p xyz-1.0.rpm | less
# rpm -q --changelog -p http://mirror.centos.org/centos/6/os/x86_64/Packages/xyz-1.1.rpm | less
compare the files list
to List Files inside the rpm:
Download xyz-1.1.rpm and list files in xyz-1.1.txt
# rpm -qlp xyz-1.1.rpm > xyz-1.1.txt
then list file of the installed package xyz-1.0.rpm
# rpm -ql xyz > xyz-1.0.txt
and finally:
# diff xyz-1.0.txt xyz-1.1.txt
;)
yum check-update
This command allows you to determine whether any updates are available for your installed packages. yum returns a list of all package updates from all repositories if any are available.
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-yum-useful-commands.html
You check the latest version of the as mentioned above using yum check-update and check the version of the installed rpm: rpm -qa | grep mypackage.
Next obtain the a copy of the current rpm and new rpm using yumdownloader (you may need to use sudo as some TLS certs may only be accessible to root) e.g:
sudo yumdownloader mypackage-current.version
sudo yumdownloader mypackage-latest.version
Then install pkgdiff: sudo yum install pkgdiff and run it to generate an HTML report on the differences:
pkgdiff mypackage-current.version mypackage-latest.version
I installed the openssl rpm some long days ago. After that i am unable to uninstall the rpm so that i deleted the /usr/bin/openssl folder manually.Though I deleted it manually, when i grep using this command rpm -qa openssl i can find the rpm.
But when i execute the openssl command in terminal it is showing bash: openssl: command not found...
When try to uninstall i am getting following error
[root#genius ~]# rpm -qa openssl
openssl-1.0.2k-8.el7.x86_64
[root#genius ~]# rpm -e openssl-1.0.2k-8.el7.x86_64
error: Failed dependencies:
/usr/bin/openssl is needed by (installed) authconfig-6.2.8-30.el7.x86_64
And also when i am tryiong to install the rpm it is showing that following output
[root#genius openssl]# rpm -ivh openssl-1.0.2k-8.el7.x86_64.rpm
Preparing... ################################# [100%]
package openssl-1:1.0.2k-8.el7.x86_64 is **already installed**
Finally,
I need the openssl package should be installed in my centOS 7 or else i need to remove the openssl package completely without any dependencies error.
You have a couple of options here:
1. Remove using yum, Note: this may remove the dependency such as authconfig
$ yum remove openssl
2. Remove using rpm cmdline, but you have to force remove it. This will not remove the depencies
$ rpm -e openssl-1.0.2k-8.el7.x86_64 --nodeps
3. or try a reinstall if you have CentOS-7 repo
$ yum reinstall openssl
If you want openssl in your system, I would try (3) first. If that doesn't work, try (2) and then do a yum install openssl. (3) and (1) are the options to use. (2) will cause the dependency package to stay in the system and the dependent package may malfunction.
How to get the location and name of files if we install daemon service in arch Linux. and what will be the command to get the list of files that are added in by the install.
To obtain the list of files that are included in an installed package (from AUR or not), simply do:
pacman -Ql package_name
and if you only want one path per line (to use in a script), use:
pacman -Qql package_name
please advice why I cant find the rpm that I installed.
I am try to check by rpm -qa | grep test ( see the example in install the rpm: )
but seems that rpm isnt installed why?
build the RPM:
[root#linux /usr/src/redhat/SOURCES]# rpm -ba /usr/src/redhat/SPECS/my_spec.spec
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/test.sh
Wrote: /root/rpmbuild/SRPMS/test.sh-6.2-2.src.rpm
install the rpm:
[root#linux /usr/src/redhat/RPMS/i386]# rpm -Uvh /root/rpmbuild/SRPMS/test.sh-6.2-2.src.rpm
1:test.sh ########################################### [100%]
[root#linux /usr/src/redhat/RPMS/i386]# rpm -qa | grep test
no results ?
the spec file:
Summary: An example tool. To show a simple rpm build of the tool.
Name: test.sh
Version: 6.2
Release: 2
Source:/root/test.sh
Group: Development/Debuggers
BuildRoot:/var/tmp/test.sh
License: OtherLicense
%description
You installed the source rpm instead of the actual rpm:
rpm -Uvh /root/rpmbuild/RPMS/test.sh-6.2-2.rpm
rpmbuild outputs two files:
A source RPM (SRPM), located in SRPMS/
A binary RPM, located in RPMS//
As Wes noted, you've installed the SRPM. You need to install the RPM, which is located in your RPMS/i386/ subdir. Don't rename the SRPM, you need to look for the file located in the RPM folder and install it:
rpm -Uvh RPMS/i386s/test.sh-6.2-2.i386.rpm
When you install src.rpm it ends up in
~/rpmbuild/SPEC
~/rpmbuild/SOURCES
If you want to rebuild and get binary rpm you should:
rpmbuild -ba test.sh-6.2-2.src.rpm
or even better
mock test.sh-6.2-2.src.rpm
Try:
rpm -q test.sh-6.2-2
or
rpm -q test.sh-6.2-2.src
I am trying to install dbus-1.1.2-12.el5.i386 but I get the error
" dbus-libs = 1.1.2-12.el5 is needed by dbus-1.1.2-12.el5.i386" :-(
So I downloaded "dbus-libs-1.1.2-12.el5.i386.rpm" in the same directory and ran the
command rpm -ivh dbus-1.1.2-12.el5.i386 again, but I still got the same error. On searching on Forums I found that RPM takes care of dependecies if they are present in the same Directory. but it does not work with -ivh option ??
Steve B is correct:
yum install dbus-libs
yum install dbus
yum will also allow you to do "whatprovides" for a package:
yum whatprovides dbus-libs
This will show you if you have another version of dbus-libs "installed" on your system, it spools out what repos provide the package and is any are provided (installed) locally.
Also helpful is:
rpm -q dbus
which will show any packages that are locally install as will:
rpm -q dbus-libs
or
rpm -qa | grep 'dbus'
You may find that you already have an eariler version of dbus installed, which case:
yum -y update dbus
Hope this helps.
http://www.of-networks.co.uk
You need to install the dependant RPMs before installing dbus. You should also know that this is the hard way, these days RPM-based distributions usually have a dependancy managment system so that you don't need to do this by hand. e.g. on Redhat/Fedora/Centos you can just type "yum install mypackagename".