我正在尝试在 Amazon Linux AMI (~centOS) 上安装 therubyracer
。
[www@ip-10-0-0-125 root]$ gem install therubyracer
Fetching: libv8-3.16.14.3-x86_64-linux.gem (100%)
Successfully installed libv8-3.16.14.3-x86_64-linux
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/home/www/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for main() in -lpthread... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling handles.cc
make: execvp: g++: Permission denied
make: *** [handles.o] Error 127
Permission denied @ dir_chdir - /root
Gem files will remain installed in /home/www/.rvm/gems/ruby-2.1.1/gems/therubyracer-0.12.1 for inspection.
Results logged to /home/www/.rvm/gems/ruby-2.1.1/extensions/x86_64-linux/2.1.0/therubyracer-0.12.1/gem_make.out
[www@ip-10-0-0-125 root]$
我不确定要尝试什么。我正在使用 gem install therubyracer
在服务器上手动安装它。我试过先做 libv8,许多不同的版本和版本组合。
我在 ~
目录中的 www
用户下运行它。
谢谢
最佳答案
你还没有在你的系统上安装 g++
(GNU C++ 编译器)...这使得编译东西变得困难:-)。
我手边没有 centos 的副本,但是像 sudo yum install g++
这样的东西可能会给你一个编译器。
关于ruby-on-rails - 制作 : execvp: g++: Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22316670/