Postgresをインストールしようとしています。次のように書きました。
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
それからこれ:
jonsdirewolf@DESKTOP-GNM7V6T:~$ sudo apt-get install postgresql-common
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-common : Depends: init-system-helpers (>= 1.18~) but 1.14ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
jonsdirewolf@DESKTOP-GNM7V6T:~$ sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
gpg: no valid OpenPGP data found.
Windows 10に組み込まれたwsl Linux環境を使用しています。
jonsdirewolf@DESKTOP-GNM7V6T:~$ uname -a
Linux DESKTOP-GNM7V6T 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
答え1
交換する必要があります
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
そして
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
リンクアドレスに示すように、16.04 xenial用です(リンクに「xenial」が含まれています)。