【问题标题】:Error installing sqlite3 gem rvm opensuse premission denied安装 sqlite3 gem rvm openssl 权限被拒绝时出错
【发布时间】:2013-08-28 08:59:12
【问题描述】:

Linux 新手。通过 rvm 安装 Ruby 2.0 和 rails 4.0。让它在我的带有 linux ubuntu 的笔记本电脑上工作,但在我的带有 linux openSUSE 的工作计算机上出现问题。

安装了 rvm、ruby 和 rails。创建了一个 rails 应用程序,但是当我运行 bundle install 时,我得到了这个:

**Errno::EACCES: Permission denied - /home/alf/.rvm/gems/ruby-2.0.0-p247/gems/sqlite3-1.3.8/API_CHANGES.rdoc
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.**

在运行 bundle install 时也得到了这个:

**Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
    /home/alf/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-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}/lib64
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/home/alf/.rvm/rubies/ruby-2.0.0-p247/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}/
        --enable-local
        --disable-local
Gem files will remain installed in /home/alf/.bundler/tmp/10121/gems/sqlite3-1.3.8 for inspection.
Results logged to /home/alf/.bundler/tmp/10121/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.**

我已经安装了 sqlite3,但不知道它是否安装在本地某个地方。我是 linux 和 openSUSE 的新手。请帮帮我。

当我运行 gem install sqlite3 -v '1.3.8' 我得到:

**ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /home/alf/.rvm/gems/ruby-2.0.0-p247/gems/sqlite3-1.3.8/API_CHANGES.rdoc**

这让我发疯,谷歌,但找不到有效的解决方案。

【问题讨论】:

  • sqlite3.h 丢失。试试'port install sqlite3 +universal' 你没有 sqlite3 及其必要的库...然后开始 gem 安装谢谢
  • 然后我明白了:如果 'port' 不是拼写错误,您可以使用 command-not-found 来查找包含它的包,如下所示:cnf port
  • yum install ruby-devel sqlite sqlite-devel ruby-rdoc 请这样做
  • 不要工作,我如何安装“yum”和“port”?如果 'yum' 不是错字,你可以使用 command-not-found 来查找包含它的包,如下所示:cnf yum
  • 你用的是哪个操作系统?

标签: ruby-on-rails linux sqlite rvm opensuse


【解决方案1】:

我在 Ubuntu 上遇到了同样的错误,试图启动一个新的 Rails 项目。在这种情况下sqlite3.h is missing,意味着 libsqlite3-dev 丢失了,我猜(我是 Ubuntu 和 Sqlite3 的新手)。答案可以在这里找到:Installing sqlite headers

~$ sudo apt-get install sqlite3
~$ sudo apt-get install libsqlite3-dev
~$ bundle install

在那之后,rails server 对我来说效果很好。我的 Welcome onboard 在 localhost 中。

【讨论】:

    猜你喜欢
    • 2011-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    • 2013-07-07
    相关资源
    最近更新 更多