Can't install sqlite3-ruby on Centos

313 views
Skip to first unread message

Derek

unread,
Sep 22, 2010, 3:11:28 PM9/22/10
to sqlite3-ruby
I have installed 2 extra version of sqlite just to be sure:
/usr/local/sqlite3.6.16
/usr/local/sqlite3.6.23.1

Now I try to install sqlite-ruby as follows:

[root@dev sqlite3-ruby-1.3.1]# gem install sqlite3-ruby -- --with-
sqlite3-include=/usr/local/sqlite3.6.16/include --with-sqlite3-lib=/
usr/local/sqlite3.6.16/lib
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-include=/usr/local/
sqlite3.6.16/include --with-sqlite3-lib=/usr/local/sqlite3.6.16/lib
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum
install sqlite3-devel'
*** 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-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib=${sqlite3-dir}/lib
--with-sqlite3lib
--without-sqlite3lib


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/
sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/
ext/sqlite3/gem_make.out

Could someone please help me to get this in? I can't upgrade sqlite
directly as this will break yum on Centos

Luis Lavena

unread,
Sep 22, 2010, 3:32:35 PM9/22/10
to sqlite...@googlegroups.com
On Wed, Sep 22, 2010 at 4:11 PM, Derek <de...@netsimple.net> wrote:
> I have installed 2 extra version of sqlite just to be sure:
> /usr/local/sqlite3.6.16
> /usr/local/sqlite3.6.23.1
>
> Now I try to install sqlite-ruby as follows:
>
> /usr/local/bin/ruby extconf.rb --with-sqlite3-include=/usr/local/
> sqlite3.6.16/include --with-sqlite3-lib=/usr/local/sqlite3.6.16/lib
> checking for sqlite3.h... yes
> checking for sqlite3_libversion_number() in -lsqlite3... no
> sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum
> install sqlite3-devel'

>


> Could someone please help me to get this in? I can't upgrade sqlite
> directly as this will break yum on Centos

Can you provide the contents of mkmf.log?

It might not be making priority the path you're providing. Others have
reported similar issue so help us get all the details.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Derek

unread,
Sep 22, 2010, 3:44:39 PM9/22/10
to sqlite3-ruby
Thanks for the quick reply. Here is the output.

[root@dev sqlite3-ruby-1.3.1]# cat /usr/local/lib/ruby/gems/1.8/gems/
sqlite3-ruby-1.3.1/ext/sqlite3/mkmf.log
find_header: checking for sqlite3.h... -------------------- yes

"gcc -E -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/
sqlite3.6.16/include -I/usr/local/include -I/opt/local/include -I/usr/
include -g -O2 -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion
-Wmissing-noreturn -Winline conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <sqlite3.h>
/* end */

--------------------

find_library: checking for sqlite3_libversion_number() in -lsqlite3...
-------------------- no

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -I/usr/
local/sqlite3.6.16/include -I/usr/local/include -I/opt/local/include -
I/usr/include -g -O2 -O3 -Wall -Wcast-qual -Wwrite-strings -
Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/usr/local/
lib -Wl,-R/usr/local/lib -L/usr/local/sqlite3.6.16/lib -Wl,-R/usr/
local/sqlite3.6.16/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/
local/lib -Wl,-R/opt/local/lib -L/usr/lib -Wl,-R/usr/lib -L. -
rdynamic -Wl,-export-dynamic -lruby-static -lsqlite3 -ldl -lcrypt
-lm -lc"
conftest.c: In function ?t?:
conftest.c:3: error: ?sqlite3_libversion_number? undeclared (first use
in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)
()))sqlite3_libversion_number; return 0; }
/* end */

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -I/usr/
local/sqlite3.6.16/include -I/usr/local/include -I/opt/local/include -
I/usr/include -g -O2 -O3 -Wall -Wcast-qual -Wwrite-strings -
Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/usr/local/
lib -Wl,-R/usr/local/lib -L/usr/local/sqlite3.6.16/lib -Wl,-R/usr/
local/sqlite3.6.16/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/
local/lib -Wl,-R/opt/local/lib -L/usr/lib -Wl,-R/usr/lib -L. -
rdynamic -Wl,-export-dynamic -lruby-static -lsqlite3 -ldl -lcrypt
-lm -lc"
conftest.c: In function ?t?:
conftest.c:3: warning: implicit declaration of function ?
sqlite3_libversion_number?
/usr/local/sqlite3.6.16/lib/libsqlite3.a(sqlite3.o): In function
`pthreadMutexTry':
/usr/src/sqlite-3.6.16/sqlite3.c:14876: undefined reference to
`pthread_mutex_trylock'
/usr/local/sqlite3.6.16/lib/libsqlite3.a(sqlite3.o): In function
`pthreadMutexAlloc':
/usr/src/sqlite-3.6.16/sqlite3.c:14753: undefined reference to
`pthread_mutexattr_init'
/usr/src/sqlite-3.6.16/sqlite3.c:14754: undefined reference to
`pthread_mutexattr_settype'
/usr/src/sqlite-3.6.16/sqlite3.c:14756: undefined reference to
`pthread_mutexattr_destroy'
/usr/local/sqlite3.6.16/lib/libsqlite3.a(sqlite3.o): In function
`testThreadLockingBehavior':
/usr/src/sqlite-3.6.16/sqlite3.c:21879: undefined reference to
`pthread_create'
/usr/src/sqlite-3.6.16/sqlite3.c:21880: undefined reference to
`pthread_join'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { sqlite3_libversion_number(); return 0; }
/* end */

--------------------

Derek

unread,
Sep 27, 2010, 7:44:05 AM9/27/10
to sqlite3-ruby
bump, anyone...? I would like to get this working on Centos. My other
option is to try another distro, but that seems to be overkill at this
early stage.

Thanks,
Derek

Luis Lavena

unread,
Sep 27, 2010, 10:13:51 AM9/27/10
to sqlite...@googlegroups.com
On Mon, Sep 27, 2010 at 8:44 AM, Derek <de...@netsimple.net> wrote:
> bump, anyone...? I would like to get this working on Centos. My other
> option is to try another distro, but that seems to be overkill at this
> early stage.
>

Can you check the other posts in this group related to gem
installation issues? Specially these ones not been able to detect
installed sqlite3

I would recommend you manually compile it in your $HOME and then
install against it.

allegra cooper

unread,
Nov 2, 2017, 2:44:29 PM11/2/17
to sqlite3-ruby
I'm having the same issue, I was told to try this command:  yum install ruby-devel sqlite sqlite-devel ruby-rdoc

I get the following:

Error: Package: ruby-devel-2.0.0.648-30.el7.x86_64 (base)
           Requires: ruby(x86-64) = 2.0.0.648-30.el7
           Installed: ruby-2.2.3-1.el7.centos.x86_64 (installed) ruby(x86-64) = 2.2.3-1.el7.centos
           Available: ruby-2.0.0.648-30.el7.x86_64 (base) ruby(x86-64) = 2.0.0.648-30.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Reply all
Reply to author
Forward
0 new messages