我要安装PG GEM错误



我在ubuntu 10.04上,如何解决此错误?

当我使用bundle install命令时,此安装必要的GEM用于使用rails s

运行该应用程序

但"捆绑安装"命令也失败。

我不了解控制台提示,有人可以帮我吗?

antonio@antonio-desktop:~/Descargas/ecozap$ gem install pg -v 0.15.1
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.
    /usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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/rvm/rubies/ruby-1.9.3-p484/bin/ruby
    --with-pg
    --without-pg
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p484/gems/pg-0.15.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p484/extensions/x86-linux/1.9.1/pg-0.15.1/gem_make.out

当我使用sudo apt-get安装libpq-dev时,我会收到以下错误:

antonio @ antonio-desktop: ~ / Downloads / ECOZAP $ sudo apt-get install libpq-dev
[sudo] password for antonio: 
E: Failed to lock / var / lib / dpkg / lock - open (11: Resource temporarily unavailable) 
E: Unable to lock the administration directory (/ var / lib / dpkg /), maybe there is another process using it?

您要做的就是关闭锁定APT的任何其他软件包管理器,然后再次安装Libpq-dev。

最新更新