尝试运行时,pattern_create.rb
我收到一条rake-10.4.2
缺少的错误消息,我需要运行捆绑安装。
运行 bundle install 它一直运行,直到pg
使用本机扩展安装 (0.18.1) 会导致错误:
Gem::Installer::ExtensionBuildError: 错误: 无法构建 gem 原生扩展。
有人告诉我:
您需要安装 postgresql-server-dev-XY 来构建服务器端扩展或 libpq-dev 来构建客户端应用程序。您需要安装 postgresql-server-dev-XY 来构建服务器端扩展或 libpq-dev 来构建客户端应用程序。
我尝试了以下方法:sudo apt-get install postgresql-9.1
,然后 sudo apt-get install python-psycopg2
和sudo apt-get install libpq-dev
最后一条指令以:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
以下包具有未满足的依赖项:
libpq-dev :
Depends: libpq5 (= 9.1.14-0+deb7u1) but 9.1.15-0+deb7u1 is to be installed
Depends: libkrb5-dev but it is not going to be installed
Depends: comerr-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
之后再次运行sudo bundle install
仍然会导致相同的错误。我错过了什么?