“gem install sqlite3-ruby”的问题在 RHEL6 上

发布于 2024-11-08 03:39:09 字数 1961 浏览 5 评论 0原文

我正在尝试在 RHEL 6 上安装 Ruby on Rails 3。我已经“yum install”sqlite 和 sqlite-devel(在 RHEL6 上是 sqlite3)。正如您所看到的,sqlite3.h 确实存在于它需要的地方。由于某种原因,“gem install sqlite3-ruby”仍然不起作用。

SQLite3:

[root@rhel6base gems]# yum list sqlite-devel
Installed Packages
sqlite-devel.x86_64            3.6.20-1.el6            @local
Available Packages
sqlite-devel.i686              3.6.20-1.el6            local 

[root@rhel6base gems]# ls -l /usr/include/sqlite3.h
-rw-r--r--. 1 root root 268966 Nov 24  2009 /usr/include/sqlite3.h

Gem install:

[root@rhel6base gems]# gem install sqlite3-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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/bin/ruby
    --with-sqlite3-dir
    --without-sqlite3-dir
    --with-sqlite3-include
    --without-sqlite3-include=${sqlite3-dir}/include
    --with-sqlite3-lib
    --without-sqlite3-lib=${sqlite3-dir}/lib


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

PS:创建一个“rhel6”标签肯定会很好,但我没有足够的声誉。

I'm attempting to install Ruby on Rails 3 on RHEL 6. I've 'yum install' sqlite and sqlite-devel (which is sqlite3 on RHEL6). As you can see, sqlite3.h does exist where it needs to be. 'gem install sqlite3-ruby' still doesn't work, for some reason.

SQLite3:

[root@rhel6base gems]# yum list sqlite-devel
Installed Packages
sqlite-devel.x86_64            3.6.20-1.el6            @local
Available Packages
sqlite-devel.i686              3.6.20-1.el6            local 

[root@rhel6base gems]# ls -l /usr/include/sqlite3.h
-rw-r--r--. 1 root root 268966 Nov 24  2009 /usr/include/sqlite3.h

Gem install:

[root@rhel6base gems]# gem install sqlite3-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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/bin/ruby
    --with-sqlite3-dir
    --without-sqlite3-dir
    --with-sqlite3-include
    --without-sqlite3-include=${sqlite3-dir}/include
    --with-sqlite3-lib
    --without-sqlite3-lib=${sqlite3-dir}/lib


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

PS: It'd sure be nice to create a 'rhel6' tag, but I don't have enough reputation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

或十年 2024-11-15 03:39:09

事实证明,您必须安装 gcc 才能使“gem install sqlite3-ruby”正常工作。它永远不会明确告诉您未找到 gcc(甚至日志文件也没有提及)。

It turns out you have to have gcc installed for 'gem install sqlite3-ruby' to work. It will never explicitly tell you that gcc isn't found (even the log file doesn't mention it).

苦笑流年记忆 2024-11-15 03:39:09

我已经“yum install”sqlite 并且
sqlite-devel(这是 sqlite3 上的
RHEL6)

这不是真的。从我的 RHEL6 服务器安装中:

# yum search sqlite
...
sqlite.i686 : Library that implements an embeddable SQL database engine
sqlite-devel.i686 : Development tools for the sqlite3 embeddable SQL database engine
...

您缺少 sqlite3.h 文件。如果您需要的文件应该位于 RHEL6 存储库中,请始终使用此命令来查找它:

# yum provides /usr/include/sqlite3.h
sqlite-devel-3.6.20-1.el6.i686 : Development tools for the sqlite3 embeddable SQL database engine
Repo        : rhel-i386-server-6.0.z
Matched from:
Filename    : /usr/include/sqlite3.h

因此安装 sqlite-devel 软件包,您将能够成功编译。祝你好运。

I've 'yum install' sqlite and
sqlite-devel (which is sqlite3 on
RHEL6)

That's not true. From my RHEL6 server installation:

# yum search sqlite
...
sqlite.i686 : Library that implements an embeddable SQL database engine
sqlite-devel.i686 : Development tools for the sqlite3 embeddable SQL database engine
...

You are missing sqlite3.h file. If you need a file that should be in RHEL6 repositories always use this command to find it:

# yum provides /usr/include/sqlite3.h
sqlite-devel-3.6.20-1.el6.i686 : Development tools for the sqlite3 embeddable SQL database engine
Repo        : rhel-i386-server-6.0.z
Matched from:
Filename    : /usr/include/sqlite3.h

Therefore install sqlite-devel package and you will be able to compile successfuly. Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文