Yum broken while updating libcurl - centos

On my Centos 6 server I updated curl using city-fan.repo but after installing I have issue with yum... I found ( after searching hours) that it was due to libssh2 older version so I removed it and downloaded again to recompile it, But to compile it GCC is not installed, When I try to ./configure libssh2-1.6.1-20150617 I have this error:
configure: error: no acceptable C compiler found in $PATH
, So I downloaded these packages from Centos repo as I am unable to use yum to install gcc:
cloog-ppl-0.15.7-1.2.el6.x86_64.rpm glibc-common-2.12-1.149.el6.x86_64.rpm kernel-headers-2.6.32-504.el6.x86_64.rpm
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm gcc-4.4.7-11.el6.x86_64.rpm glibc-devel-2.12-1.149.el6.x86_64.rpm mpfr-2.4.1-6.el6.x86_64.rpm
cpp-4.4.7-11.el6.x86_64.rpm glibc-2.12-1.149.el6.x86_64.rpm glibc-headers-2.12-1.149.el6.x86_64.rpm ppl-0.10.2-11.el6.x86_64.rpm
When I try to install those I get this:
rpm -ivh *.rpm
Preparing... ########################################### [100%]
package glibc-common-2.12-1.149.el6_6.5.x86_64 (which is newer than glibc-common-2.12-1.149.el6.x86_64) is already installed
package glibc-2.12-1.149.el6_6.5.x86_64 (which is newer than glibc-2.12-1.149.el6.x86_64) is already installed
file /usr/sbin/build-locale-archive from install of glibc-common-2.12-1.149.el6.x86_64 conflicts with file from package glibc-common-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/tzdata-update from install of glibc-common-2.12-1.149.el6.x86_64 conflicts with file from package glibc-common-2.12-1.149.el6_6.5.x86_64
file /lib64/ld-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /lib64/libc-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /lib64/libresolv-2.12.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /sbin/ldconfig from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /sbin/sln from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1364.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1371.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1388.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1390.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM1399.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM933.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM935.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM937.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/lib64/gconv/IBM939.so from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/glibc_post_upgrade.x86_64 from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/iconvconfig from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
file /usr/sbin/iconvconfig.x86_64 from install of glibc-2.12-1.149.el6.x86_64 conflicts with file from package glibc-2.12-1.149.el6_6.5.x86_64
and if I run any yum command it is displaying me this error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libssh2.so.1: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
I am very novice to this...Any help? Thanks

You have majorly hosed your system.
You downloaded rpm packages that are older than the ones you already have installed (that's what that error message is telling you).
Get the rpm packages for the libssh2 and curl packages you removed and fix yum.
Then find a better way to do whatever you were trying to do in the first place. Anything that requires you to upgrade a core component of the operating system (like libcurl) in a way that the official packages can't handle is broken by design.

have you tried doing the following:
yum provides libssh2.so.1
then installing one of the providing packages
e.g. yum install libssh2 ?

Related

cloudera-manager-agent.rpm: does not update installed package error

I was installing CM and CDH on CentOS6.9, some errors happended on one of the hosts.
So I want to reinstall cloudera-manager-agent, but failed.
Then I used rpm to reinstall(I had download the rpms), here is the result:
[root#xxx yum.repos.d]# rpm -e cloudera-manager*
error: package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager.repo is not installed
error: package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
error: package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
[root#vm8034 yum.repos.d]# rpm -U cloudera-manager*
error: cloudera-manager.repo: not an rpm package (or package manifest):
[root#vm8034 yum.repos.d]# rpm -U cloudera-manager*.rpm
package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64 is already installed
[root#xxx yum.repos.d]# rpm -q cloudera-manager*
package cloudera-manager-agent-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager-daemons-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager.repo is not installed
package cloudera-manager-server-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
package cloudera-manager-server-db-2-5.12.0-1.cm5120.p0.120.el6.x86_64.rpm is not installed
Try using yum instead of rpm and see if that works:
yum update cloudera-manager*
UPDATE:
Try a yum update. This will search for the available updates of your system and display a list with them. You can check if cloudera is in the list or not.
Then check the official website and see if there is any new version for download:
https://www.cloudera.com/downloads/manager/5-12-0.html
If there is try downloading the package, save it on your server and manually install it:
rpm -Uhv package-version-.rpm
Also you should check the content of /etc/yum.conf for an exclude = option. Usually that's used to exclude certain packages from update. If you find cloudera there, then that's why it will never update that package.

How to fix "file /etc/init.d from install of <package> conflicts with file from package chkconfig"

I have converted Debian package installation to CentOS RPM using alian. I'm getting below error when I try to install it.
Error:
file /etc/init.d from install of <package> conflicts with file from package chkconfig
I can install it by rpm -Uvh --force but I'm getting Not starting : <package> disabled. when I try to start it using init.d.
I'm not sure how to what is the correct path to track the issue. I appreciate some help.
To prevent the conflict you should exclude /etc/init.d from the .spec file. e.g.
%files
/etc
%exclude %dir /etc/init.d
This will only exclude the /etc/init.d directory. Any files under /etc/init.d/* will still be included.

How can I install the perl-RRD-Simple package on CentOS 7?

I'm trying to install TSung on CentOS 7, but I'm having trouble installing the dependencies.
When I tried to install perl-RRD-Simple.noarch, yum shows no package available. So I downloaded an RPM file and did:
rpm -ivh perl-RRD-Simple-1.43-1.el5.rf.noarch.rpm
But I got an error:
error: Failed dependencies:
perl(RRDs) is needed by perl-RRD-Simple-1.43-1.el5.rf.noarch
How can I install the perl-RRD-Simple package? RRDtool is already installed.
RRD::Simple depends on RRDs.pm, the Perl bindings for RRDtool. RRDs.pm is in the rrdtool-perl package; on CentOS 7, rrdtool-perl is in the base repo, so you can just do:
yum install rrdtool-perl
You'll also need to find a different perl-RRD-Simple RPM, since perl-RRD-Simple-1.43-1.el5.rf.noarch.rpm is for EL5. The only one I can find for EL7 is here.
Alternatively, you can build your own RPM.

Could I use yum to install package on redhat without root?

I recently rent a server for web-app testing purpose. Below is my server info, I assume it's Redhat linux. (I have used Ubuntu for a while).
Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
When I wanted to install tmux on the server, I was thinking about using YUM for ease (not compile myself). When I type yum in terminal, nothing come out.
nl0391 [~]$ which yum
nl0391 [~]$
There is no rpm as well.
I supposed there is no yum installed. So I was thinking about installing yum myself from source. I got sources of yum and found I need gettext for installing yum. So I compiled gettext on my home successfully and continued to compile yum.
First I used ./configure --configure=~/.usr/local to point to my home dir which I have permission to write.
Then make and make install.
During make install, there's some problem with /etc/yum.config. It was also the permission issue so I change the MakeFile to let config in my ~/ect/yum.config. This helped to successfully compile yum and finish installation.
I can successfully run command yum or man yum. I believe the installation is right.
But when I ran yum install tmux or yum info (let yum do something), the errors kept going out like below:
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/home/wxx920521/.usr/local/bin/yum", line 31, in <module>
yummain.main(sys.argv[1:])
File "/home/wxx920521/.usr/local/src/yum-2.0.7/yummain.py", line 163, in main
(log, errorlog, filelog, conf, cmds) = parseCmdArgs(args)
File "/home/wxx920521/.usr/local/src/yum-2.0.7/yummain.py", line 75, in parseCmdArgs
conf=yumconf(configfile=yumconffile)
File "/home/wxx920521/.usr/local/src/yum-2.0.7/config.py", line 155, in __init__
self.yumvar['releasever'] = self._getsysver()
File "/home/wxx920521/.usr/local/src/yum-2.0.7/config.py", line 285, in _getsysver
idx = ts.dbMatch('provides', self.distroverpkg)
_rpm.error: rpmdb open failed.
I even changed the python files of YUM to fix the yum.conf file path issues, but for rpmdb issue I just realized manually resolving this path might be nightmare and impossible.
So I am wondering if I can use YUM on the root for which I don't have root permission? I can directly compile tmux in my home. Is it worthwhile to devote time compiling yum which potentially can't use if no root? Since I know on ubuntu apt-get install needs sudo before any usage?
Any idea is appreciated.

Fedora MongoDB issue Installing

I've installed mongoDB on fedora 17 and the server don't running.
I got the same error in this post MongoDB service not running in Fedora and then and try to fallow this instruction and I got another error
Trying to do this
yum --disablerepo=* --enablerepo=fedora,updates install mongodb mongodb-server
I got this Error
Transaction Check Error:
file /usr/bin/bsondump from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongo from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongodump from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongoexport from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongofiles from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongoimport from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongorestore from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongostat from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /usr/bin/mongotop from install of mongodb-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-2.0.6-mongodb_1.x86_64
file /etc/sysconfig/mongod from install of mongodb-server-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-server-2.0.6-mongodb_1.x86_64
file /usr/bin/mongod from install of mongodb-server-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-server-2.0.6-mongodb_1.x86_64
file /usr/bin/mongos from install of mongodb-server-2.0.2-10.fc17.x86_64 conflicts with file from package mongo-10gen-server-2.0.6-mongodb_1.x86_64
Error Summary
It looks as though you've already installed the 10gen packages for MongoDB 2.0.6. The conflicts are caused by trying to also install the default Fedora packaged version of MongoDB (2.0.2 from your error messages) which includes binaries with the same name.
Instead of reinstalling, you should be able to start the MongoDB service as root or using sudo:
service mongod start
With the 10gen packaged install you should find:
/etc/mongod.conf for changing configuration options
default data directory: /var/lib/mongo
default log file directory: /var/log/mongo
the init script at: /etc/rc.d/init.d/mongod