Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make: execvp: g++: Permission denied

I'm trying to install therubyracer on Amazon Linux AMI (~centOS).

[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]$

I am not sure what to try.. I'm installing it manually on the server with gem install therubyracer. I have tried doing libv8 first, many different versions and combinations of versions.

I'm running this under the www user in the ~ directory.

Thanks

like image 359
st0rk Avatar asked Mar 11 '14 04:03

st0rk


1 Answers

You haven't installed g++ (the GNU C++ compiler) on your system... that makes it hard to compile things :-).

I don't have a copy of centos handy, but something like sudo yum install g++ will probably get you a compiler.

like image 169
MadScientist Avatar answered Oct 17 '22 20:10

MadScientist