简体   繁体   English

宝石安装错误

[英]Gem installing error

Wont install this gem, and I get this response. 不要安装这个宝石,我得到这个回应。

greg@greg-VirtualBox:~$ 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

make: g++: Command not found Reading the output should is something that you should learn to do. make:g ++:找不到命令读取输出应该是你应该学会做的事情。 Especially when things aren't going as planned. 特别是当事情没有按计划进行时。

Depending on your flavor of Linux. 取决于你的Linux风格。 Use the package manager and install the gcc package. 使用包管理器并安装gcc包。

Arch Linux : pacman -Syu gcc Arch Linuxpacman -Syu gcc

Ubuntu/Debian/Mint : apt-get install gcc (you may also need to install build-essential ) Ubuntu / Debian / Mintapt-get install gcc (你可能还需要安装build-essential

Fedora : yum install gcc gcc-c++ or yum groupinstall "Development Tools" (for all dev tools) Fedorayum install gcc gcc-c++yum groupinstall "Development Tools" (适用于所有开发工具)

After installing the compiler rerun the gem installation and it should be fine unless you're missing other dependencies 安装编译器后重新运行gem安装,除非你缺少其他依赖项,否则应该没问题

You need to install gcc. 你需要安装gcc。 Run this line: 运行此行:

sudo apt-get install build-essential

It worked for me (with ubuntu) 它适用于我(使用ubuntu)

Just saw the build was failing on tweetstream's github. 刚刚看到构建在tweetstream的github上失败了。

sudo install g++

fixed 固定

对于Amazon Linux: sudo yum install gcc-c++

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM