So have a question on why RedHat rpm -e would fail to remove a package in a script but manually removing the rpm would work.
So I am installing MySQL in a bash script as root that looks like:
rpm -ivh
http://192.168.150.6/MySQL/MySQL-sha...1-1.el6.x86_64
rpm -ivh
http://192.168.150.6/MySQL/MySQL-sha...1-1.el6.x86_64
rpm -ivh
http://192.168.150.6/MySQL/MySQL-ser...1-1.el6.x86_64
rpm -ivh
http://192.168.150.6/MySQL/MySQL-cli...1-1.el6.x86_64
The installer complains that there are file conflicts:
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-
advanced-5.6.21-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.71-1.el6.x86_64
That is fine I can deal with that so I added a "rpm -e mysql-libs-5.1.71-1.el6.x86_64"
However when I run it in the script before I install the MySQL packages it complains that the package is required by postfix:
libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2
.2.el6_1.x86_64
But when I do a the "rpm -e mysql-libs-5.1.71-1.el6.x86_64" from the command line it removes the package and does not complain about the dependency. I can remove it in a script if I have 1 script that has the remove command and then calls the install script.