error in installing ruby-devel using yum? - json

Hello I try to install ruby gem json but it gives following error
`Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
Gem files will remain installed in /home/jenkins/.gem/ruby/gems/json-2.0.2 for inspection.
Results logged to /home/jenkins/.gem/ruby/gems/json-2.0.2/ext/json/ext/generator/gem_make.out`
I looked up similar post and was directed to install ruby-devel. But thats also given me a hard time.
yum install ruby-devel
Loaded plugins: addreleaserel, priorities, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package ruby-devel.x86_64 0:2.0.0.598-25.el7_1 will be installed
--> Processing Dependency: ruby(x86-64) = 2.0.0.598-25.el7_1 for package: ruby-devel-2.0.0.598-25.el7_1.x86_64
--> Finished Dependency Resolution
Error: Package: ruby-devel-2.0.0.598-25.el7_1.x86_64 (RHN-rhel-x86_64-server-optional-7-1-locked)
Requires: ruby(x86-64) = 2.0.0.598-25.el7_1
Installed: ruby-2.0.0.648-29.el7.x86_64 (#RHN-rhel-x86_64-server-7-latest)
ruby(x86-64) = 2.0.0.648-29.el7
Available: ruby-2.0.0.353-20.el7.x86_64 (RHN-rhel-x86_64-server-7)
ruby(x86-64) = 2.0.0.353-20.el7
Available: ruby-2.0.0.353-22.el7_0.x86_64 (RHN-rhel-x86_64-server-7)
ruby(x86-64) = 2.0.0.353-22.el7_0
Available: ruby-2.0.0.598-24.el7.x86_64 (RHN-rhel-x86_64-server-7)
ruby(x86-64) = 2.0.0.598-24.el7
Available: ruby-2.0.0.598-25.el7_1.x86_64 (RHN-rhel-x86_64-server-7-1-locked)
ruby(x86-64) = 2.0.0.598-25.el7_1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Can anyone suggest me steps to install ruby-devel using yum?please

Something seems off about your configured repositories.
From your error message, YUM is attempting to install ruby-devel.x86_64 0:2.0.0.598-25.el7_1 from the "RHN-rhel-x86_64-server-optional-7-1-locked" channel, but you currently have ruby-2.0.0.648-29.el7.x86_64 installed from the "#RHN-rhel-x86_64-server-7-latest" channel which will not satisfy the dependency as the release versions do not match.
For YUM to complete the transaction you posted, it would have to install an older version of the RedHat ruby package and I don't think it wants to do that without being explicitly told.
There are a couple options I can think of, depending on how you want to resolve this. My first suggestion is what I would do if I were managing this server, which is to straighten out the repository configuration and discover why yum install ruby-devel is attempting to install an older package (it might have something to do with that locked channel).
The other option is to install that ruby-devel package by any means necessary which may not be good for your RedHat subscription or could break things. You would first replace the installed version of ruby with the older one that matches ruby-devel, then attempt to install ruby-devel:
yum downgrade ruby-2.0.0.598-25
yum install ruby-devel-2.0.0.598-25
I do not have a RedHat machine with a subscription so I would not be able to test if this second suggestion would even work, use at your own risk. I would also recommend again you attempt the first suggestion of fixing your repositories or figure out why one of the channels is locked as that method would be safer and you could get support from RedHat if needed.
Hope that helps

Related

Can I bypass installing glibc.i686 as a dependency when I already have the x86_64 version?

I'm trying to install Atom from the official RPM provided. libXss.so.1 is a dependency and tries to install the 32-bit version of glibc when I already have the 64-bit version. It then conflicts with the 2.23.1-7 older version of glibc that I already have.
So where do I go from here? I'm guessing that there is a bugfix somewhere in libXss. libXss tries to install i686 arch for all it's dependencies.
I'm using Fedora 24 x86_64
Terminal Output
sudo rpm -ivh atom.x86_64.rpm
error: Failed dependencies:
libXss.so.1 is needed by atom-1.13.0-0.1.x86_64
sudo dnf install libXss.so.1
Error: Transaction check error:
file /usr/share/doc/glibc/NEWS from install of glibc-2.23.1-11.fc24.i686 conflicts with file from package glibc-2.23.1-7.fc24.x86_64
sudo dnf install glibc-2.23.1-11.fc.24.x86_64
Package glibc-2.23.1-11.fc24.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
Secondary/Unimportant Question
Do I need glibc-2.23.1-7.fc24.x86_64 when I already have glibc-2.23.1-11.fc24.x86_64? I see that I have both installed yet I have no conflict problems.
edit
I gave up and decided to install from the copr repo
sudo dnf copr enable mosquito/atom
sudo dnf install atom
Error: Transaction check error:
file /usr/lib64/libkadm5clnt_mit.so.10.0 from install of libkadm5-1.14.4-4.fc24.x86_64 conflicts with file from package krb5-libs-1.14.1-6.fc24.x86_64
file /usr/lib64/libkadm5srv_mit.so.10.0 from install of libkadm5-1.14.4-4.fc24.x86_64 conflicts with file from package krb5-libs-1.14.1-6.fc24.x86_64
What is going on?
Can I bypass installing glibc.i686 as a dependency when I already have the x86_64 version?
Not if you need to install 32-bit software — you'll need the 32-bit libs for that. 64-bit libraries aren't supersets of the 32-bit ones.
I'm trying to install Atom from the official RPM provided. libXss.so.1 is a dependency and tries to install the 32-bit version of glibc when I already have the 64-bit version. It then conflicts with the 2.23.1-7 older version of glibc that I already have.
This is a frequent problem. Installing 32-bit versions of packages without updating to the latest versions of the main 64-bit packages is not supported. Upgrade first, then install.
Do I need glibc-2.23.1-7.fc24.x86_64 when I already have glibc-2.23.1-11.fc24.x86_64? I see that I have both installed yet I have no conflict problems.
This can happen if there's an interrupted upgrade transaction. You should be able to dnf remove glibc-2.23.1-7.fc24.x86_64 safely. If that gives you errors, time to stop and make sure nothing else is wrong. Or, you can really just ignore it — next time a new glibc update comes out, it should replace both.
I gave up and decided to install from the copr repo
The errors you see here are actually the same root problem as trying to install 32-bit packages without updating first. RPMs can share files, as long as they are completely identical. That's true in matched versions of the various kerberos packages, but not true if there's a mismatch, and the dependency information doesn't handle this. So, again upgrade to latest packages before installing new ones.

Zenoss core installation compatibility issue with MySQL

I am facing an issue between the Zenoss core installation and MySQL rpms.
The Zenoss core installation won't complete, complaining about mysql-client and mysql-shared versions, even though I have newer versions installed. As suggested in this Quest/answer ,
I also tried to install a 5.5.41 client package but it did not change anything. Here's the situation:
[root#bstfe1032 Zenoss]# yum -y --nogpgcheck localinstall zenoss-4.2.0.el6.x86_64.rpm
[...]
--> Finished Dependency Resolution
Error: Package: zenoss-4.2.0-1586.el6.x86_64 (/zenoss-4.2.0.el6.x86_64)
Requires: mysql-client >= 5.5.13
Error: Package: zenoss-4.2.0-1586.el6.x86_64 (/zenoss-4.2.0.el6.x86_64)
Requires: mysql-shared >= 5.5.13
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root#bstfe1032 Zenoss]# rpm -qa|grep -i mysql
MySQL-client-5.6.22-1.el6.x86_64
MySQL-server-5.6.22-1.el6.x86_64
MySQL-shared-5.6.22-1.el6.x86_64
The Zenoss core install doc points to MySQL packages from mysql.org and this is where I got them.
Any idea of what I should try next ? I am using CentOS 6, this is a testbed and not a production machine because I wanted to give Zenoss core a test drive.
You are mixing "old" packages (zenoss-4.2.0) with too new one (MySQL 5.6) and it's not probably handled correctly in Zenoss core packages.
The best option for you is to use autodeploy script - https://github.com/zenoss/core-autodeploy/blob/4.2.5/core-autodeploy.sh
It will download last Zenoss packages from http://sourceforge.net/projects/zenoss/files/zenoss-4.2/zenoss-4.2.5/
and MySQL packages from ftp://mirror.anl.gov/pub/mysql/Downloads/MySQL-5.5/
See http://wiki.zenoss.org/Install_Zenoss for more information.

What is a yum package conflict?

When running the transaction check to install mysql i'm getting:
Processing Conflict: mysql55-5.5.29-1.w6.x86_64 conflicts mysql < 5.5
I guess this means i'm attempting to install a package called mysql55-5.5.29-1.w6.x86_64 on to a system with mysql already installed but somehow there is a conflict?
yum says that mysql isn't installed so it was installed without using the repositories. In that case how does yum know there is confict?
it would be good to better under what 'confict' means.
There are many online yum repo available and all are free opensource contribute. So source packages are compiled with different options in each repo. So when we add 2 or more yum repo at a time, it may happen that 2 or more packages are of same version are selected and we get a conflict error.
In your case you added some repo which is providing mysql 5.5 which is already available with some other name in some other repo or already installed but new mysql package is selected by yum for any other package as dependency. Try removing one of the repo or try installing it as yum install mysql-5.5*
You can try this : yum list | grep mysql. It will list mysql in different packages, then you can make a decision to remove one of them and install mysql again.

Installing sphinx on Dreamhost

I'm following this tutorial: http://hughevans.net/2009/03/10/thinking-sphinx-dreamhost
I'm run into an issue when I run:
./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local/
I get an error: "cannot find MySQL include files."
I've checked and cant find mysql_config, so I'm guessing the mysql-devel package isn't installed.
My next step is to install the mysql-devel package from source, but I'm thinking that I may be missing something.
Has anyone found a solution for this issue?
(I'm using a VPS)
My next step is to install the mysql-devel package from source
Why from source?
Suggest just using a package manager to install the package.
I solved my problem by using a different user with root access.
With that user I installed sphinx with APT.
sudo apt-get install sphinxsearch

Installing datamapper mysql dm-mysql-adapter on redhat

I'm trying to move a small Sinatra app I have going on an Ubuntu box to a redhat box.
While installing gems, I get a "Can't build native extension" error while trying to install the gem dm-mysql-adapter.
I have mysql-devel installed, which I believe is the required library, but it doesn't seem to work.
All the info I can find online is for Ubuntu and says installing libmysqlclient-dev (which doesn't exist for Redhat; again, I believe mysql-devel is the appropriate package).
Any advice for someone using redhat?
you have the correct package "mysql-devel-5.1.48-1" but the gem installs fine on my centos5 box without the package installed, you could try the ruby-mysql gem instead.
[11:13:01][root#HOST:~]# gem search mysql
*** LOCAL GEMS ***
[11:13:03][root#HOST:~]# rpm -qa | grep -i mysql
perl-DBD-MySQL-3.0007-2.el5
mysql-5.0.77-4.el5_5.4
[11:13:11][root#HOST:~]# gem install mysql
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...
...
[11:13:22][root#HOST:~]#