[英]You have held broken packages - Postgres gem for rails
So when ever I attempt to do bundle install I am told to make sure the pg gem is installed successfully, so when I do the gem install pg vx.xx
I get:因此,当我尝试进行 bundle install 时,我被告知要确保 pg gem 安装成功,所以当我执行
gem install pg vx.xx
我得到:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/adam/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
So then I do:那么我这样做:
sudo apt-get install libpq-dev
But I get但我得到
The following packages have unmet dependencies:
libpq-dev : Depends: libpq5 (= 9.1.14-0ubuntu0.12.04) but 9.3.5-1.pgdg12.4+1 is to be installed
E: Unable to correct problems, you have held broken packages.
So I have 9.1 of everything else installed from postgres and pgadmin, and I have any 9.3 repos disabled.所以我从 postgres 和 pgadmin 安装了 9.1 的所有其他东西,并且我禁用了任何 9.3 存储库。 I have done a
sudo apt-get update
but I think the error is pretty obvious.我已经完成了
sudo apt-get update
但我认为错误很明显。 So How do I make it not try and install 9.3.5 .... and go with 9.1.14?那么我如何让它不尝试安装 9.3.5 .... 并使用 9.1.14?
I've just run into this very problem.我刚刚遇到了这个问题。 I found the solution here: http://blog.andrewbeacock.com/2007/03/how-to-install-specific-version-of.html
我在这里找到了解决方案: http : //blog.andrewbeacock.com/2007/03/how-to-install-specific-version-of.html
Essentially:本质上:
$: apt-get install libpq5=9.1.14-0ubuntu0.12.04
$: apt-get install libpq-dev=9.1.14-0ubuntu0.12.04
$: apt-get install postgresql-server-dev-9.1
I got the same issue, after trying multiple solutions my problem我遇到了同样的问题,在尝试了多种解决方案后我的问题
The following packages have unmet dependencies:以下软件包具有未满足的依赖项:
but it is not going to be installed
Depends: libwxbase3.0-0v5 (>= 3.0.4+dfsg)
but it is not installable
Depends: ```libwxgtk3.0-0v5 (>= 3.0.4+dfsg)
but it is not installable
E: Unable to correct problems, you have held broken packages.
The above resolved by uninstalling Postgresql and pgAdmin and downloading it from the official website以上通过卸载Postgresql和pgAdmin并从官网下载解决
https://www.postgresql.org/ https://www.postgresql.org/
https://www.pgadmin.org/download/pgadmin-4-apt/ https://www.pgadmin.org/download/pgadmin-4-apt/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.