2013-03-10 137 views
2

不會安裝這個寶石,我得到了這個迴應。寶石安裝錯誤

[email protected]:~$ gem install tweetstream 
Building native extensions. This could take a while... 
ERROR: Error installing tweetstream: 
ERROR: Failed to build gem native extension. 

/home/greg/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb 
checking for main() in -lssl... yes 
checking for main() in -lcrypto... yes 
checking for openssl/ssl.h... yes 
checking for openssl/err.h... yes 
checking for rb_trap_immediate in ruby.h,rubysig.h... no 
checking for rb_thread_blocking_region()... yes 
checking for inotify_init() in sys/inotify.h... yes 
checking for writev() in sys/uio.h... yes 
checking for rb_wait_for_single_fd()... yes 
checking for rb_enable_interrupt()... yes 
checking for rb_time_new()... yes 
checking for sys/event.h... no 
checking for epoll_create() in sys/epoll.h... yes 
creating Makefile 

make 
compiling ssl.cpp 
make: g++: Command not found 
make: *** [ssl.o] Error 127 


Gem files will remain installed in /home/greg/.rvm/gems/ruby-1.9.3-  p362/gems/eventmachine-1.0.3 for inspection. 
Results logged to /home/greg/.rvm/gems/ruby-1.9.3-p362/gems/eventmachine-  1.0.3/ext/gem_make.out 
+1

你缺少'G ++'因爲錯誤說。搜索如何安裝,你應該沒問題。 – jvnill 2013-03-10 01:53:20

+0

sudo安裝g ++,你是男人 – Greg 2013-03-10 02:18:39

回答

7

化妝:G ++:命令未找到 讀取輸出應該是東西,你應該學會做。尤其是當事情沒有按計劃進行時。

取決於你的Linux風格。使用軟件包管理器並安裝gcc軟件包。

Arch Linux的pacman -Syu gcc

的Ubuntu/Debian上/造幣廠apt-get install gcc(您可能還需要安裝build-essential

的Fedorayum install gcc gcc-c++yum groupinstall "Development Tools"(適用於所有開發工具)

安裝編譯器後重新運行gem安裝,它應該沒問題,除非你錯過了其他d依賴關係

1

剛剛看到構建在tweetstream的github上失敗。

sudo install g++ 

固定

7

您需要安裝gcc。 運行這行:

sudo apt-get install build-essential 

它爲我(與Ubuntu)

1

對於Amazon Linux的:sudo yum install gcc-c++