Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to run this command to get ruby 1.9.1 working on my system:

rvm install 1.9.1

It says "error running make" and when I cat the log file this is the compile error I am getting:

gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC  -O2 -g -Wall -Wno-parentheses  -fPIC  -o ossl.o -c ossl.c
ossl.c:118:1: error: unknown type name ‘STACK’
ossl.c:119:1: error: unknown type name ‘STACK’
make[1]: *** [ossl.o] Error 1
make[1]: Leaving directory `/var/cache/ruby-rvm/src/ruby-1.9.1-p431/ext/openssl'
make: *** [mkmain.sh] Error 1

So whats up with this? How do I get ruby 1.9.1 working under ubuntu 11.04?

share|improve this question
    
Have you managed to solve the issue? I have the same problem on Debian. It seems that ruby 1.9.1 is not compatible with openssl 1.0.0. –  Mladen Jablanović Jan 25 '12 at 10:37
    
@Mladen Jablanović Sort of. I had to pull down the latest source for openssl, build it, and then override ruby's openssl path (or replace the current build of openssl). –  Hank Jan 25 '12 at 16:06

2 Answers 2

STACK appears to be a typedef which is defined in /usr/include/openssl/stack.h on my system.

This file is provided by libssl-dev according to dpkg - do you have that package installed?

share|improve this answer

According to the latest version of RVM on my own system, you need the following in order to compile a Ruby on Ubuntu 11.10:

build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

I suggest you install them, and then run rvm reinstall 1.9.1 to cleanup the 1.9.1 code and install it.

share|improve this answer
2  
the current list of required libs can be listed with rvm requirements. 1.9.1 is very old version, it does not have much attention from community, you could build it with applying patches for ruby-1.8.6 - openssl integration rvm reinstall 1.9.1 --patch $rvm_path/patches/ruby/1.8.6/openssl-1.0.patch,patches/ruby/1.8.6/no_sslv2.diff there are more patches that could help find $rvm_ruby/patches/ruby/ -type f –  mpapis Feb 1 '12 at 21:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.