I am trying to setup puppet-dashboard on a RHEL6 64 bit machine. I was able to get all the pieces installed for Ruby, Gems, etc but now when I try to run passenger-install-apache2-module it fails with this error -
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:259: error: ‘_GLIBCXX_END_NAMESPACE’ does not name a type
In file included from ext/boost/config/posix_features.hpp:18,
from ext/boost/config/platform/linux.hpp:74,
from ext/boost/config.hpp:53,
from ext/boost/thread/detail/config.hpp:11,
from ext/boost/thread/tss.hpp:8,
from ext/oxt/system_calls.hpp:28,
from ext/common/Utils.cpp:26:
/usr/include/unistd.h:28: error: expected constructor, destructor, or type conversion before ‘extern’
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/new:40,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_construct.h:60,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/memory:51,
from ext/boost/config/no_tr1/memory.hpp:21,
from ext/boost/smart_ptr/shared_ptr.hpp:27,
from ext/boost/shared_ptr.hpp:17,
from ext/boost/thread/tss.hpp:9,
from ext/oxt/system_calls.hpp:28,
from ext/common/Utils.cpp:26:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception:35: error: expected declaration before end of line
rake aborted!
Command failed with status (1): [c++ -Iext -Iext/common -Iext/libev -fPIC -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1 -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security -fno-strict-aliasing -I/usr/include/httpd -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o buildout/apache2/module_libpassenger_common/Utils.o -c ext/common/Utils.cpp]
Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/module_libpassenger_common/Utils.o
I searched the Googles and it seems like swap is a common cause for similar problems but it looks like I should have plenty for this -
total used free shared buffers cached
Mem: 3924852 1794880 2129972 0 349916 626264
-/+ buffers/cache: 818700 3106152
Swap: 4095992 112864 3983128
I don't know much about Ruby so I can't do much for deep troubleshooting. Can anyone help?
I'm not sure what that error means but I got passenger going by doing:
yum install -y httpd httpd-devel mod_ssl ruby-devel rubygems gcc-c++ curl-devel zlib-devel make automake
gem install rack passenger
passenger-install-apache2-module
Hope this helps
Related
I am trying to install mitproxy on my EC2 linux instance using pip:
sudo pip install mitmproxy
I have python2.7 installed, and now 2 instances of libffi
$ rpm -qa | grep libff
libffi-3.0.13-11.4.amzn1.x86_64
libffi-devel-3.0.13-11.4.amzn1.x86_64
but each time I try to run the install command I get the following error message:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:423:30: fatal error: openssl/opensslv.h: No such file or directory
#include <openssl/opensslv.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Any thoughts where I'm going wrong?
Just solved the problem with following solution:
wget source code gzip package from https://www.openssl.org/source/
config&&make&&make install
Good luck!
Looking for a wise sage to point me in the right direction for what I can do next.
I use RVM and brew on OS X. I've confirmed that xcode is up to date and that xcode command line tools are installed.
I'm hitting this error during gem install tiny_tds
/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:381:in
'try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:461:in 'try_link0'
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:476:in 'try_link'
from /Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:619:in 'try_func'
I added some debug logging to mkmf.rb to see what was going on at that point.
The call to try_do was passing the following in the command argument:
command
/usr/local/opt/gcc46/bin/gcc-4.6 -o conftest -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/x86_64-darwin13.4.0 -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/backward -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1 -I. -I/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/include -I/usr/include -I/usr/local/include -I/usr/local/mysql/include -I/opt/X11/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fno-common -pipe conftest.c -L. -L/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib -L/Users/bdx/.rvm/rubies/ruby-1.9.3-p448/lib -L/usr/lib -L/usr/local/lib -L/usr/local/mysql/lib -L/opt/X11/lib -L/usr/local/git/lib -L/Users/bdx/.rvm/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.1.9.1 -lpthread -ldl -lobjc
Following that command argument, I found that /usr/local/opt/gcc46/bin/gcc-4.6 didn't exist. Doing locate gcc-4.6 found its path for me, so I ran: ln -s /usr/local/opt/gcc46/bin/gcc-4.6 /usr/local/Library/ENV/4.3/gcc-4.6 and tried again, but the same error keeps occurring.
I have encountered the same error -
You have to install development tools first
when tried to install tiny_tds gem. When inspecting the log file mkmf.rb, I found the error was:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Running xcode-select --reset fixed the problem for me.
sudo passenger-install-nginx-module
--------------------------------------------
Where do you want to install Nginx to?
Please specify a prefix directory [/opt/nginx]:
--------------------------------------------
Compiling Passenger support files...
# /usr/bin/ruby1.8 /usr/local/bin/rake nginx:clean nginx RELEASE=yes
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent
rm -rf agents/nginx/PassengerHelperAgent
mkdir -p ext/common/libboost_oxt
g++ -Iext -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libboost_oxt/aggregate.o -c ext/common/libboost_oxt/aggregate.cpp
In file included from ext/boost/src/pthread/thread.cpp:27:0,
from ext/common/libboost_oxt/aggregate.cpp:6:
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_time(int, boost::xtime&)â:
ext/boost/src/pthread/timeconv.inl:22:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_timespec_duration(const boost::xtime&, timespec&)â:
ext/boost/src/pthread/timeconv.inl:59:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_duration(boost::xtime, int&)â:
ext/boost/src/pthread/timeconv.inl:90:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
ext/boost/src/pthread/timeconv.inl: In function âvoid {anonymous}::to_microduration(boost::xtime, int&)â:
ext/boost/src/pthread/timeconv.inl:112:9: warning: variable âresâ set but not used [-Wunused-but-set-variable]
mkdir -p ext/common/libboost_oxt
rm -rf ext/common/libboost_oxt.a
ar cru ext/common/libboost_oxt.a ext/common/libboost_oxt/aggregate.o
ranlib ext/common/libboost_oxt.a
mkdir -p ext/common/libpassenger_common
g++ -Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/aggregate.o -c ext/common/libpassenger_common/aggregate.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
rake aborted!
Command failed with status (4): [g++ -Iext -Iext/common -Iext/libev -D_REE...]
/var/lib/gems/1.8/gems/passenger-3.0.19/build/cplusplus_support.rb:31:in `compile_cxx'
/var/lib/gems/1.8/gems/passenger-3.0.19/build/common_library.rb:126:in `define_common_library_task'
Tasks: TOP => nginx => agents/nginx/PassengerHelperAgent => ext/common/libpassenger_common.a => ext/common/libpassenger_common/aggregate.o
(See full trace by running task with --trace)
OS
Ubuntu server 64 bit
os version - 12.04.2 (latest update)
ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
rails -v
rails version - 2.3.16
passenger --version
Phusion Passenger version 3.0.19
Increasing RAM size from 256 MB to 1 GB solved the issue, initially i was running an cloud instance with 256 MB of RAM, This makes g++ don't have enough memory to compile.
I recently upgraded to Mac OS X 10.7 from 10.6.
I decided to use Python 2.7.
But when I'm trying to install the MySQLdb module to run Django, it fails:
$ sudo pip install MySQL-python
Downloading/unpacking MySQL-python
[…]
Running setup.py install for MySQL-python
building '_mysql' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute llvm-gcc-4.2: No such file or directory
error: command 'llvm-gcc-4.2' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='~/Sites/gugsm/build/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-AwMuqj-record/install-record.txt:
running install
running build
[…]
building '_mysql' extension
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute llvm-gcc-4.2: No such file or directory
error: command 'llvm-gcc-4.2' failed with exit status 1
----------------------------------------
The reason is that I no longer have llvm-gcc nor gcc binaries.
I tried to upgrade XCode from 3.something to 4.3.2, but it din't help. It comes as a simple app and it doesn't populate /usr/bin with llvm-gcc.
What am I doing wrong?
In Xcode 4.3's Preferences menu, select Downloads and then install Command Line Tools.
making a symlink worked for me:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
As a requirement for chef-client, I am trying to install yajl-ruby on OpenSUSE 12.1. So far, it is returning the following message:
linux:~ # gem install yajl-ruby
Building native extensions. This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
creating Makefile
make
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_alloc.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_buf.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_encode.c
yajl_encode.c: In function ‘hexToDigit’:
yajl_encode.c:201:1: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
make: *** [yajl_encode.o] Error 1
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
The appropriate packages are installed:
zypper install ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
It may be an issue with the compiler or there may be an issue specific on OpenSUSE. So far, I am not sure which path to take.
gcc clearly recommends you to send bug report to OpenSuse with full preprocessed source (-E option instead of "-c" and add a redirect to file). This may be because opensuse gcc might have some modifications. You should check instructions on bugs.opensuse.org and send a bug report to OpenSuse. If the bug is in basic gcc too, opensuse bugzilla people will forward it upstream or will ask you to do this
To avoid an "internal compiler error" without sending bugs you can try to change build options. Usually "internal compiler error" means that something goes wrong in complex process of optimizations, so you can just change this process (order of optimization stages and which are enabled). Easiest is to change level of optimization (e.g. replace -O2 with -O1 or -O0) or add something like -Osize.