Phusion Passenger Ubuntu 11.10 - gcc

I just upgraded to ubuntu 11.10 and I have a problem starting phusion passenger. I get the following error:
/usr/bin/ld: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/nginx/../common/libpassenger_common.a(aggregate.o): undefined reference to symbol 'round##GLIBC_2.2.5'
/usr/bin/ld: note: 'round##GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/tmp/root-passenger-23103/nginx-1.0.5'
make: *** [build] Error 2
Was wondering if there is a fix for this issue or if it is a known issue that may be fixed soon.
Thanks

To fix this problem install gcc-4.4.
sudo apt-get install gcc-4.4 g++-4.4 libstdc++6-4.4-dev
rvmsudo CC=gcc-4.4 passenger-install-nginx-module

The rvmsudo solution did not work for me, as I had the passenger gem already installed, and rvm wanted to use that instead of the system-wide one that rvmsudo installed.
What did work for me is:
sudo apt-get install gcc-4.4 g++-4.4 libstdc++6-4.4-dev
CC=gcc-4.4 passenger start

Related

How to download Ruby (<2.0) on virtualbox/ubunto 20.04 using rbenv

I am having issues installing Ruby with rbenv and it appears to be an openssl issue. I have followed the below links with no success
Links:
OpenSSL error installing Ruby 2.1.x and 2.3.x on Archlinux with ruby-install/ruby-build
https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error
Ubuntu 20.04
OpenSSL 1.0.2
ruby-build 20211019
scoop#scoop-VirtualBox:~$ rbenv install 1.9.3-p327
Downloading yaml-0.1.6.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/scoop/.rbenv/versions/1.9.3-p327
Downloading ruby-1.9.3-p327.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2
Installing ruby-1.9.3-p327...
WARNING: ruby-1.9.3-p327 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
BUILD FAILED (Ubuntu 20.04 using ruby-build 20211019)
Inspect or clean up the working tree at /tmp/ruby-build.20211022151319.51817.ZFwydR
Results logged to /tmp/ruby-build.20211022151319.51817.log
Last 10 log lines:
| ^~~~~~~~~~~~
ossl_ocsp.c: In function ‘ossl_ocspcid_get_serial’:
ossl_ocsp.c:694:1: warning: control reaches end of non-void function [-Wreturn-type]
694 | }
| ^
make[2]: *** [Makefile:267: ossl_ocsp.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327/ext/openssl'
make[1]: *** [exts.mk:126: ext/openssl/all] Error 2
make[1]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327'
make: *** [uncommon.mk:178: build-ext] Error 2
I found Ubuntu > 18.04 does not have the correct dependencies to support OpenSSL 1.0 so I switched to 18.04 and did the following:
# cd into source directory you downloaded and unarchived
./config --prefix=/opt/openssl-1.0 shared
make
make test
sudo make install
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/openssl-1.0" rbenv install <version>
this comes from the below link:
https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error

Error on installing ruby with jemalloc

I am on ubuntu 12.04.5 LTS and tried installing ruby with jemalloc. The jemalloc got installed successfully(https://blog.scalingo.com/2017/05/02/improve-ruby-application-memory-jemalloc.html) but while installing the ruby 2.3.4, it gave this following error.
>rvm install 2.3.4 -C --with-jemalloc
Warning, new version of rvm available '1.29.1', you are using older version '1.27.0'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
ruby-2.3.4 - #removing src/ruby-2.3.4..
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/deploy/.rvm/rubies/ruby-2.3.4, this may take a while depending on your cpu(s)...
ruby-2.3.4 - #downloading ruby-2.3.4, this may take a while depending on your connection...
ruby-2.3.4 - #extracting ruby-2.3.4 to /home/deploy/.rvm/src/ruby-2.3.4....
ruby-2.3.4 - #configuring...........................................................
ruby-2.3.4 - #post-configuration..
ruby-2.3.4 - #compiling.....
Error running '__rvm_make -j2',
showing last 15 lines of /home/deploy/.rvm/log/1494486344_ruby-2.3.4/make.log
compiling enumerator.c
compiling error.c
compiling eval.c
eval.c: In function 'rb_raise_jump':
eval.c:763:8: warning: unused variable 'mid' [-Wunused-variable]
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
In file included from gc.c:50:0:
/usr/include/malloc.h:152:15: error: conflicting types for 'malloc_usable_size'
/usr/include/jemalloc/jemalloc.h:45:8: note: previous declaration of 'malloc_usable_size' was here
make: *** [gc.o] Error 1
make: *** Waiting for unfinished jobs....
++ return 2
There has been an error while running make. Halting the installation.
Has anyone encountered it before or may have the experience with it, please help.
On [xK]ubuntu 18.10
I did
sudo apt install libjemalloc-dev
rvm install 2.5.2 -C --with-jemalloc
rvm use 2.5.2
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
I use Ubuntu 18.04.
Change the command like this
RUBY_EXTRA_CONFIGURE_OPTIONS="--with-jemalloc" rvm install 2.3.4 --disable-binary
To check the jemalloc is installed, run the following command:
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
if the ruby is unrecognized after rvm is installed.
source ~/.rvm/scripts/rvm
When the jemalloc is called. You can see the response.
-lpthread -ljemalloc -ldl -lobjc
You can see the full documentation here
I ran across a variant of this issue when trying to get rails to use jemalloc. In my case I had (purposefully) installed system-wide rubies via rvm but forgotten to use rvmsudo like so:
$ sudo apt update; sudo apt install libjemalloc-dev -y
$ rvmsudo rvm reinstall 2.4.1 -C --with-jemalloc
If you're getting permissions warnings when trying to get jemalloc to work in an analogous scenario, give ^^^ a shot...

rbenv : BUILD FAILED when Install Ruby 2.2.3 on UBUNTU 14.04 (x86_64)

I am trying to install ruby 2.2.3, previously I have installed ruby 2.2.2,
rbenv versions
system
* 2.2.2 (set by /home/emen/.ruby-version)
jruby-1.7.20
jruby-9.0.0.0.pre2Build
I got a problem when tried to install Ruby 2.2.3, got build failed below :
rbenv install 2.2.3
Downloading ruby-2.2.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.bz2 Installing ruby-2.2.3...
BUILD FAILED (Ubuntu 14.04 using ruby-build 20160111-27-g06f1254)
Inspect or clean up the working tree at /tmp/ruby-build.20160127112741.26444 Results logged to /tmp/ruby-build.20160127112741.26444.log
I have inspected log, just copy a part of suspect since another checking and compiling process were fine :
linking shared-object objspace.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/objspace'
compiling ossl_ssl.c
make[2]: Entering directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/pathname'
compiling pathname.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:142:27: error: ‘SSLv3_server_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:143:27: error: ‘SSLv3_client_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default pathname libraries
linking shared-object date_core.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/date'
linking shared-object pathname.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/pathname'
linking shared-object nkf.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/nkf'
make[1]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3'
make: *** [build-ext] Error 2
I have tried to follow this
rbenv install ruby BUILD FAILED
I have run this :
sudo apt-get install libffi-dev
or
sudo apt-get install git-core curl
zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev
python-software-properties libffi-dev
and
curl -fsSL https://gist.github.com/ekr1/7313abef4348daa038dd.txt |
rbenv install --patch 2.2.3
but still no luck, I might miss something, appreciating your help. Thanks!
I have fixed this build failed by patching from https://gist.github.com/mislav/055441129184a1512bb5/
executed this :
curl -fsSL https://gist.github.com/mislav/055441129184a1512bb5.txt |
rbenv install --patch 2.2.3
this looks like an openssl problem. The SSL_v3 not defined means that you don't have it or you have an older library.
Try:
rvm pkg install openssl
rvm install 2.2.3 --with-openssl-dir=$HOME/.rvm/usr

linking shared-object rlibmemcached.bundle failing on gem install

When I try to install the memcached gem:
gem install memcached -v '1.4.1
I get this error and the install fails:
linking shared-object rlibmemcached.bundle
ld: in '/usr/local/lib/libcrypto.0.9.8.dylib', file was built for i386 which is not the architecture being linked (x86_64): /usr/local/lib/libcrypto.0.9.8.dylib for architecture x86_64
collect2: ld returned 1 exit status
make: *** [rlibmemcached.bundle] Error 1
make failed, exit code 2
Any one have any suggestions for how to fix this?
For anyone who finds this later...
I should have read the prompt more closely. I had a conflicting libcrypto.dylib on my computer. I ran
brew doctor
and that highlighted the erroneous files. I removed them, then the gem install went just fine.

Error installing gnupg2 dependency libusb using homebrew

I'm installing gnupg2 using homebrew on mac osx and getting errors intstalling the dependency libusb.
brew install gpg2
....
==> Installing gnupg2 dependency: libusb
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
Already downloaded: /Library/Caches/Homebrew/libusb-1.0.9.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.9
==> make install
os/darwin_usb.c:1749: error: old-style parameter declarations in prototyped function definition
os/darwin_usb.c:1749: error: expected '{' at end of input
make[1]: *** [libusb_1_0_la-darwin_usb.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install-recursive] Error 1
Any ideas how to fix this?
Thanks
Had the same problem, fixed it by installing the XCode command line tools (previously was using gcc standalone package)

Resources