postgresql 安装 libpq-dev 包报错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17183792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install libpq-dev package error
提问by KRH
I tried to install pg gem and I have had this warning:
我尝试安装 pg gem,但收到了以下警告:
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
您需要安装 postgresql-server-dev-XY 来构建服务器端扩展或安装 libpq-dev 来构建客户端应用程序。
So I tried install libpq-dev package and I have had this warning:
所以我尝试安装 libpq-dev 包,但我收到了这个警告:
libpq-dev : Depends: libpq5 (= 8.4.17-0squeeze1) but 9.1.9-1~bpo60+1 is to be installed
libpq-dev : 依赖: libpq5 (= 8.4.17-0squeeze1) 但要安装 9.1.9-1~bpo60+1
How to fix this?
如何解决这个问题?
回答by mackwerk
This should let you install the package you need :) Just tried it myself, I am not sure you will need all the packages on the second line, try it and see :)
这应该让你安装你需要的包:) 我自己试过了,我不确定你是否需要第二行的所有包,试试看:)
apt-get update
apt-get install libxslt-dev libxml2-dev libpam-dev libedit-dev
aptitude install -t squeeze-backports postgresql-server-dev-9.1
回答by Max Sherbakov
You must setup postgresql-server-dev-X.Y, where X.Y. your's servers version, and it will install libpq-dev and other servers variables at modules for server side developing. In my case it was
您必须设置 postgresql-server-dev-XY,其中 XY 您的服务器版本,它将在模块中安装 libpq-dev 和其他服务器变量以进行服务器端开发。就我而言,它是
apt-get install postgresql-server-dev-9.5
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libmysqlclient18 mysql-common Use 'apt-get autoremove' to remove them. The following extra packages will be installed:
libpq-dev Suggested packages: postgresql-doc-10 The following NEW packages will be installed: libpq-dev postgresql-server-dev-9.5
读取包列表...完成 构建依赖树 读取状态信息...完成 以下包已自动安装,不再需要: libmysqlclient18 mysql-common 使用 'apt-get autoremove' 删除它们。将安装以下额外包:
libpq-dev 建议包:postgresql-doc-10 将安装以下新包:libpq-dev postgresql-server-dev-9.5