I'm trying to test out an RPM I wrote for Jmeter on CentOS. I followed some guides online and when I do 'sudo rpm --install jmeter.i386.rpm' it says the package is already installed. However when I do 'sudo rpm --erase jmeter.i386.rpm' it says the package is not installed. How can I resolve this issue?
Most files pertaining to RPM are kept in the /var/lib/rpm/ directory. For more information on RPM, refer to the chapter Chapter 10, Package Management with RPM. The /var/cache/yum/ directory contains files used by the Package Updater, including RPM header information for the system.
By using rpm --erase
correctly.
--install
takes an RPM.
--erase
takes a package name.
So rpm -Uvh jmeter.i386.rpm
is paired with rpm -e jmeter
or jmeter.i386
.
As an aside, generally avoid using -i
/--install
in favor of -U
/--upgrade
as it has saner behavior in many cases (and will install a package that isn't already installed just fine). Alternatively, stop using rpm
entirely and just start using yum
instead yum install jmeter.i386.rpm
. (Yes, install
works for localinstall
.)
yum takes RPMs or package names (that are in the configured repositories) for installation and takes package names for removal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With