在我的EC2 redhat實例上,我嘗試安裝帶有gem的httparty。安裝ruby-devel和httparty
下面的網站,我添加回購和安裝ruby193。
http://developerblog.redhat.com/2013/01/28/software-collections-on-red-hat-enterprise-linux/
是的,我有創造的紅寶石和寶石是/ usr/bin中軟鏈接和/etc/ld.so.conf.d/創建的conf文件並運行ldconfig命令。
現在,當我嘗試安裝我收到以下錯誤。
gem install httparty json
Building native extensions. This could take a while...
.
ERROR: Error installing httparty:
ERROR: Failed to build gem native extension.
/opt/rh/ruby193/root/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /opt/rh/ruby193/root/usr/share/include/ruby.h
Gem files will remain installed in /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.1 for inspection.
Results logged to /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
Building native extensions. This could take a while...
.
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/opt/rh/ruby193/root/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /opt/rh/ruby193/root/usr/share/include/ruby.h
Gem files will remain installed in /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.1 for inspection.
Results logged to /opt/rh/ruby193/root/usr/local/share/gems/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
做了一些Google搜索,發現我需要安裝ruby-devel。得到rpm並嘗試安裝現在我得到錯誤以下。
#-> yum install /tmp/ruby-devel-1.9.3.392-22.1.x86_64.rpm
Loaded plugins: amazon-id, rhui-lb, security
rhui-us-east-1-client-config-server-6 | 2.6 kB 00:00
rhui-us-east-1-rhel-server-releases | 3.7 kB 00:00
rhui-us-east-1-rhel-server-releases-optional | 3.5 kB 00:00
Setting up Install Process
Examining /tmp/ruby-devel-1.9.3.392-22.1.x86_64.rpm: ruby-devel-1.9.3.392-22.1.x86_64
Marking /tmp/ruby-devel-1.9.3.392-22.1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ruby-devel.x86_64 0:1.9.3.392-22.1 will be installed
--> Processing Dependency: ruby(x86-64) = 1.9.3.392-22.1 for package: ruby-devel-1.9.3.392-22.1.x86_64
--> Finished Dependency Resolution
Error: Package: ruby-devel-1.9.3.392-22.1.x86_64 (/ruby-devel-1.9.3.392-22.1.x86_64)
Requires: ruby(x86-64) = 1.9.3.392-22.1
Available: ruby-1.8.7.299-4.el6.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.299-4.el6
Available: ruby-1.8.7.299-5.el6_0.1.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.299-5.el6_0.1
Available: ruby-1.8.7.299-7.el6.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.299-7.el6
Available: ruby-1.8.7.299-7.el6_1.1.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.299-7.el6_1.1
Available: ruby-1.8.7.352-3.el6.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-3.el6
Available: ruby-1.8.7.352-4.el6_2.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-4.el6_2
Available: ruby-1.8.7.352-7.el6_2.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-7.el6_2
Available: ruby-1.8.7.352-10.el6_4.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-10.el6_4
Available: ruby-1.8.7.352-12.el6_4.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-12.el6_4
Available: ruby-1.8.7.352-13.el6.x86_64 (rhui-us-east-1-rhel-server-releases)
ruby(x86-64) = 1.8.7.352-13.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我知道它抱怨ruby1.9,但我已經安裝了它。