尝试运行pattern_create.rb
时收到错误消息rake-10.4.2
缺失,我需要运行bundle install。
运行捆绑包安装它运行直到安装pg
(0.18.1)与原生扩展导致错误:
Gem :: Installer :: ExtensionBuildError:错误:无法构建gem原生扩展。
我被告知:
您需要安装postgresql-server-dev-X.Y来构建服务器端扩展,或者安装libpq-dev来构建客户端应用程序。 您需要安装postgresql-server-dev-X.Y来构建服务器端扩展,或者安装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
仍然会导致相同的错误。我错过了什么?
答案 0 :(得分:0)
实际上没有解决为什么捆绑安装不起作用,我在Stackoverflow上找到了这个:Metasploit induction of bundle and rake
来自Aj和Mahendra的解决方案让我运行...
import my.company
...
public void yourMethodWithMainCall() {
// my.company.MainClass is defined as 'Main-Class' in META-INF/MANIFEST.MF of a.jar
MainClass.main(...);
...
}
。