Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-16-2011, 10:01 AM
|
#1
|
Member
Registered: Nov 2010
Posts: 33
Rep:
|
Trouble installing Ruby mongrel/mysql/passenger on CentOS
I'm trying to install RubyOnRails, I'm at the point of installing the gem modules mongrel, mysql and passenger
Running
gem install mongrel
Returns
Code:
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o http11_parser.o -c http11_parser.c
http11_parser.rl: In function 'http_parser_execute':
http11_parser.rl:105: warning: comparison between signed and unsigned
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o http11.o -c http11.c
http11.c: In function 'http_field':
http11.c:77: error: 'struct RString' has no member named 'ptr'
http11.c:77: error: 'struct RString' has no member named 'len'
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c: In function 'header_done':
http11.c:172: error: 'struct RString' has no member named 'ptr'
http11.c:172: error: 'struct RString' has no member named 'ptr'
http11.c:172: error: 'struct RString' has no member named 'ptr'
http11.c:174: error: 'struct RString' has no member named 'ptr'
http11.c:176: error: 'struct RString' has no member named 'ptr'
http11.c:177: error: 'struct RString' has no member named 'len'
http11.c: In function 'HttpParser_execute':
http11.c:298: error: 'struct RString' has no member named 'ptr'
http11.c:299: error: 'struct RString' has no member named 'len'
make: *** [http11.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out
Running gem install mysql returns a similar result
Code:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for mysql_ssl_set()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
/usr/local/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /usr/local/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:50:in `<main>'
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.8.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
And running gem install passenger returns
Code:
Successfully installed passenger-3.0.2
1 gem installed
Installing ri documentation for passenger-3.0.2...
Installing RDoc documentation for passenger-3.0.2...
ERROR: While executing gem ... (Encoding::UndefinedConversionError)
U+2019 from UTF-8 to ISO-8859-1
ruby -v is
Code:
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]
and gem -v is
rails -v is
-Sam
|
|
|
01-16-2011, 01:12 PM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Ruby-1.9.2p136 : May be not OK for the gem packages ?
Fedora 14 has ruby-1.8.7.302.
The upcoming Fedora 15 has currently 1.8.7.330.
How about installing ' el5 ' packages ? CentOS 5 has ruby-1.8.5 :
1) # yum search <name> ( or part of name.)
2) # yum install ruby-mysql rubygem-rails rubygem-mongrel <etc.> <etc.>
3) # gem install passenger
The base repo will supply nine ruby packages. The EPEL repo : 60 packages.
Then you are sure to get packages that work on CentOS 5.
EPEL, Extra Packages for Enterprise Linux https://fedoraproject.org/wiki/EPEL
https://fedoraproject.org/wiki/EPEL/FAQ#howtouse
..
|
|
|
01-16-2011, 03:17 PM
|
#3
|
Member
Registered: Nov 2010
Posts: 33
Original Poster
Rep:
|
OK so I got rails/passenger etc. working with the latest versions but I'm now having difficulty getting the SQLite3 gem installed.
When I first tried installing it I got an error about not having the latest version so I downloaded the latest version and manually compiled it to /root/sqlite (And chmod'd/chown'd appropriately) then tried to install with
gem install sqlite3-ruby -- --with-sqlite3-dir=/root/sqlite
But now I'm getting the error
Code:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb --with-sqlite3-dir=/root/sqlite
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_next_stmt()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -I/root/sqlite/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o statement.o -c statement.c
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -I/root/sqlite/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o exception.o -c exception.c
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -I/root/sqlite/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o sqlite3.o -c sqlite3.c
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -I/root/sqlite/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o database.o -c database.c
gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_ENABLE_LOAD_EXTENSION -DHAVE_SQLITE3_LOAD_EXTENSION -I/root/sqlite/include -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o backup.o -c backup.c
gcc -shared -o sqlite3_native.so statement.o exception.o sqlite3.o database.o backup.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L/root/sqlite/lib -Wl,-R/root/sqlite/lib -L. -rdynamic -Wl,-export-dynamic -lsqlite3 -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: /root/sqlite/lib/libsqlite3.a(sqlite3.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/root/sqlite/lib/libsqlite3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [sqlite3_native.so] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.2/ext/sqlite3/gem_make.out
-Sam
|
|
|
01-17-2011, 08:28 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
OK, Debian Sid ( x86_64 ) has 'ruby-1.9.1' ( from ruby1.9.1_1.9.2.0.orig.tar.gz)
.. and I can try out some stuff :
# apt-get install mongrel libsqlite3-ruby1.9.1
# gem install sqlite3
No problems with this Ruby 1.9.1**, may be you just need a "stable" version ?
http://packages.debian.org/sid/ruby1.9.1-full
..
|
|
|
01-17-2011, 02:45 PM
|
#5
|
Member
Registered: Nov 2010
Posts: 33
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
OK, Debian Sid ( x86_64 ) has 'ruby-1.9.1' ( from ruby1.9.1_1.9.2.0.orig.tar.gz)
.. and I can try out some stuff :
# apt-get install mongrel libsqlite3-ruby1.9.1
# gem install sqlite3
No problems with this Ruby 1.9.1**, may be you just need a "stable" version ?
http://packages.debian.org/sid/ruby1.9.1-full
..
|
I'm on CentOS/Redhat so I can't use Debian packages and both Ruby and SQLITE3 are the latest stable versions
|
|
|
01-19-2011, 11:43 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
The stable ruby 1.9.2p136 is stable in the way that you can use it,
when you write a new ruby application using the new included features.
But it may not work with all current ruby 'gems' / ruby applications ?
And : If you are not writing any ruby, an older version will do.
The reason to show the Debian [ruby1.9.1_1.9.2.0.orig.tar.gz] is
just to let you know a version, that works with all the old gems, etc.
Basically a '1.9.1', but with features from '1.9.2' included.
The 27 required patches : [ruby1.9.1_1.9.2.0-2.debian.tar.gz]
..
Last edited by knudfl; 01-19-2011 at 03:09 PM.
|
|
|
01-19-2011, 02:56 PM
|
#7
|
Member
Registered: Nov 2010
Posts: 33
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
The stable ruby 1.9.2p136 is stable in the way that you can use it,
when you write a new ruby application using the new included features.
But it will not work with all current ruby 'gems' / ruby applications.
And : If you are not writing any ruby, an older version will do.
The reason to show the Debian [ruby1.9.1_1.9.2.0.orig.tar.gz] is
just to let you know a version, that works with all the old gems, etc.
Basically a '1.9.1', but with features from '1.9.2' included.
The 27 required patches : [ruby1.9.1_1.9.2.0-2.debian.tar.gz]
..
|
Ruby/Rails/Gems are installed successfully, the problem was with SQLite not ruby. Thanks for your help everyone but all I needed was to roll back to an older version of SQLite that was compatible with the gem.
-Sam
|
|
|
All times are GMT -5. The time now is 06:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|