[Ubuntu18.04]yumがインストールできなかった。。。

スポンサーリンク

新しくセットアップしたパソコンでyumをインストールしようとしたら、怒られて対応した話。

環境

  • Windows10 上のWindows Subsystem for Linux (WSL)
  • Ubuntu18.04.2 LTS

詳細

やったことと起きたこと

単純にaptでyumをインストールしようとした。

そうしたら以下のログを出し、エラーとなった。
※最後の2行ぐらいの"404 Not Found"とか

$ sudo apt install yum
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  debugedit libarchive13 libdw1 libelf1 liblua5.2-0 libnspr4 libnss3 libpython-stdlib libpython2.7
  libpython2.7-minimal libpython2.7-stdlib librpm8 librpmbuild8 librpmio8 librpmsign8 libsqlite0 python python-libxml2
  python-lzma python-minimal python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber python2.7
  python2.7-minimal rpm rpm-common rpm2cpio
Suggested packages:
  rpm-i18n lrzip python-doc python-tk libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc python-sqlite-dbg
  python2.7-doc binutils binfmt-support alien elfutils rpmlint rpm2html
The following NEW packages will be installed:
  debugedit libarchive13 libdw1 liblua5.2-0 libnspr4 libnss3 libpython-stdlib libpython2.7 libpython2.7-minimal
  libpython2.7-stdlib librpm8 librpmbuild8 librpmio8 librpmsign8 libsqlite0 python python-libxml2 python-lzma
  python-minimal python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber python2.7
  python2.7-minimal rpm rpm-common rpm2cpio yum
The following packages will be upgraded:
  libelf1
1 upgraded, 30 newly installed, 0 to remove and 127 not upgraded.
Need to get 8403 kB of archives.
After this operation, 34.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-minimal amd64 2.7.15-4ubuntu4~18.04.2 [336 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7-minimal amd64 2.7.15-4ubuntu4~18.04.2 [1296 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-minimal amd64 2.7.15~rc1-1 [28.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7-stdlib amd64 2.7.15-4ubuntu4~18.04.2 [1916 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python2.7 amd64 2.7.15-4ubuntu4~18.04.2 [239 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpython-stdlib amd64 2.7.15~rc1-1 [7620 B]
Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 python amd64 2.7.15~rc1-1 [140 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libelf1 amd64 0.170-0.4ubuntu0.1 [44.8 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libdw1 amd64 0.170-0.4ubuntu0.1 [203 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 liblua5.2-0 amd64 5.2.4-1.1build1 [108 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnspr4 amd64 2:4.18-1ubuntu1 [112 kB]
Ign:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnss3 amd64 2:3.35-2ubuntu2.5
Get:13 http://archive.ubuntu.com/ubuntu bionic/universe amd64 librpmio8 amd64 4.14.1+dfsg1-2 [74.6 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/universe amd64 debugedit amd64 4.14.1+dfsg1-2 [19.1 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive13 amd64 3.2.2-3.1ubuntu0.5 [288 kB]
Err:12 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libnss3 amd64 2:3.35-2ubuntu2.5
  404  Not Found [IP: 91.189.88.149 80]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython2.7 amd64 2.7.15-4ubuntu4~18.04.2 [1053 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic/universe amd64 librpm8 amd64 4.14.1+dfsg1-2 [173 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic/universe amd64 librpmbuild8 amd64 4.14.1+dfsg1-2 [70.5 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic/universe amd64 librpmsign8 amd64 4.14.1+dfsg1-2 [8184 B]
Get:20 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libsqlite0 amd64 2.8.17-14fakesync1 [160 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python-libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1.2 [141 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-lzma amd64 0.5.3-3 [27.9 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-sqlite amd64 1.0.1-12 [20.9 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-pycurl amd64 7.43.0.1-0.2 [43.1 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic/main amd64 python-urlgrabber all 3.10.2-1 [51.0 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic/universe amd64 rpm-common amd64 4.14.1+dfsg1-2 [28.7 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic/universe amd64 rpm2cpio amd64 4.14.1+dfsg1-2 [7988 B]
Get:28 http://archive.ubuntu.com/ubuntu bionic/universe amd64 rpm amd64 4.14.1+dfsg1-2 [119 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-rpm amd64 4.14.1+dfsg1-2 [44.7 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic/universe amd64 python-sqlitecachec amd64 1.1.4-1 [21.4 kB]
Get:31 http://archive.ubuntu.com/ubuntu bionic/universe amd64 yum all 3.4.3-3 [486 kB]
Fetched 7268 kB in 32s (227 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.35-2ubuntu2.5_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

対応

ログのコメント通り、apt-get updateしてからインストールした。

apt updateの実行

$ sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
~~~略~~~
Get:21 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4028 B]
Fetched 4446 kB in 13s (333 kB/s)
Reading package lists... Done

yumのインストール

$ sudo apt install yum
Reading package lists... Done
Building dependency tree
~~~略~~~
Setting up rpm (4.14.1+dfsg1-2) ...
Setting up yum (3.4.3-3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

確認

$ yum
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

check          Check for problems in the rpmdb
~~~略~~~

コメント

タイトルとURLをコピーしました