Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Gem安装错误_Ruby_Linux_Gem_Tweetstream - Fatal编程技术网

Ruby Gem安装错误

Ruby Gem安装错误,ruby,linux,gem,tweetstream,Ruby,Linux,Gem,Tweetstream,不会安装这个gem,我得到了这个响应 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/

不会安装这个gem,我得到了这个响应

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

刚刚看到tweetstream的github上的构建失败了

sudo install g++
固定的

make:g++:未找到命令 阅读输出应该是你应该学会做的事情。尤其是当事情没有按计划进行时

取决于您对Linux的喜好。使用包管理器并安装gcc包

Arch-Linux
pacman-Syu-gcc

Ubuntu/Debian/Mint
apt-get-install-gcc
(您可能还需要安装
build-essential

Fedora
yum安装gcc-c++
yum-groupinstall“开发工具”
(适用于所有开发工具)

安装编译器后,重新运行gem安装,除非您缺少其他依赖项,否则应该没有问题

您需要安装gcc。 运行此行:

sudo apt-get install build-essential

对于我来说(使用ubuntu)

对于Amazon Linux:
sudo-yum安装gcc-c++

正如错误中所说,您缺少了
g++
。搜索如何安装,你应该会很好。sudo安装g++,你是在生产Fedora 28,“开发工具”没有安装gcc-c++。我必须明确地安装那个软件包。然而,这对我起了作用。多谢!