- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
VirtualBox VM 上的 Ubuntu 16.04 使用 Vagrant。Windows 10 主机。Git Bash 终端。
连接到 vagrant up,vagrant ssh。
我有一个全新的 VM,并安装了 ruby 和 rails。我正在尝试安装 postgresql 以用于 Ruby on Rails 项目,但出现以下错误:
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install postgresql postgresql-contrib
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:
The following packages have unmet dependencies: postgresql : Depends: postgresql-9.6 but it is not going to be installed postgresql-contrib : Depends: postgresql-contrib-9.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我试过各种东西,似乎没有什么能让我安装 postgres
最佳答案
我在我的 ubuntu 16.04 中遇到了同样的问题
但我解决了这个问题,只需按照以下步骤操作即可非常简单,您将能够在您的系统中安装 postgresql 10:
将此添加到您的 sources.list 中:
sudo vim /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.de.debian.org/debian/ wheezy main non-free contrib
之后,将这些链接添加到您的 pgdg.list
文件中(如果不存在,您必须创建并添加链接并保存)。
sudo vim /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
然后更新你的系统
sudo apt-get update
sudo apt-get upgrade
并安装未满足的依赖项:
apt-get install ssl-cert
就是这样。现在使用这些命令安装 postgresql
sudo apt-get install postgresql-10
关于postgresql - 尽管有 "unmet dependencies",但如何在 Ubuntu 16.04 VM 上安装 postgresql 以设置 Ruby on Rails 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41123297/
我是一名优秀的程序员,十分优秀!