我想在 Ubuntu 20.4 上安装 containernet(Mininet),但出现此错误,尽管我已经安装了(cgroup-tools),但我输入了
sudo ansible-playbook -i "localhost," -c local install.yml
错误消息
fatal: [localhost]: FAILED! => {"changed": true, "cmd":
"containernet/util/install.sh", "delta": "0:00:05.640086", "end": "2020-09-01 16:09:32.350865", "msg": "non-zero return code", "rc": 100,
"start": "2020-09-01 16:09:26.710779", "stderr": "E: Package 'cgroup-bin'
has no installation candidate", "stderr_lines": ["E: Package 'cgroup-bin'
has no installation candidate"], "stdout": "Detected Linux distribution:
Ubuntu 20.04 focal amd64\npython3 is version 3\nInstalling all packages
except for -eix (doxypy, ivs, nox-classic)...\nInstall Mininet-compatible
kernel if necessary\nHit:1 http://au.archive.ubuntu.com/ubuntu focal
InRelease\nHit:2 https://download.docker.com/linux/ubuntu focal
InRelease\nHit:3 http://au.archive.ubuntu.com/ubuntu focal-updates
InRelease\nHit:4 http://au.archive.ubuntu.com/ubuntu focal-backports
InRelease\nHit:5 http://security.ubuntu.com/ubuntu focal-security
InRelease\nReading package lists...\nReading package lists...\nBuilding
dependency tree...\nReading state information...\nlinux-image-5.4.0-42-
generic is already the newest version (5.4.0-42.46).\nThe following package
was automatically installed and is no longer required:\n libfprint-
2-tod1\nUse 'sudo apt autoremove' to remove it.\n0 to upgrade, 0 to newly
install, 0 to remove and 0 not to upgrade.\nInstalling Mininet
dependencies\nReading package lists...\nBuilding dependency tree...\nReading
state information...\nPackage cgroup-bin is not available, but is referred
to by another package.\nThis may mean that the package is missing, has been
obsoleted, or\nis only available from another source\nHowever the following
packages replace it:\n cgroup-tools", "stdout_lines": ["Detected Linux
distribution: Ubuntu 20.04 focal amd64", "python3 is version 3", "Installing
all packages except for -eix (doxypy, ivs, nox-classic)...", "Install
Mininet-compatible kernel if necessary", "Hit:1 http://au.archive.ubuntu.com
/ubuntu focal InRelease", "Hit:2 https://download.docker.com/linux/ubuntu
focal InRelease", "Hit:3 http://au.archive.ubuntu.com/ubuntu focal-updates
InRelease", "Hit:4 http://au.archive.ubuntu.com/ubuntu focal-backports
InRelease", "Hit:5 http://security.ubuntu.com/ubuntu focal-security
InRelease", "Reading package lists...", "Reading package lists...",
"Building dependency tree...", "Reading state information...", "linux-image-
5.4.0-42-generic is already the newest version (5.4.0-42.46).", "The
following package was automatically installed and is no longer required:", "
libfprint-2-tod1", "Use 'sudo apt autoremove' to remove it.", "0 to upgrade,
0 to newly install, 0 to remove and 0 not to upgrade.", "Installing Mininet
dependencies", "Reading package lists...", "Building dependency tree...",
"Reading state information...", "Package cgroup-bin is not available, but is
referred to by another package.", "This may mean that the package is
missing, has been obsoleted, or", "is only available from another source",
"However the following packages replace it:", " cgroup-tools"]}
我该如何修复它?
答案1
我也遇到了类似的问题。我认为 containernet 的 ansible 使用的是 cgi-bin,它本身已被弃用,只能通过 cgroup-tools 访问。这是 20.04 的问题。
我建议您使用 docker 镜像,因为它在 ubuntu trusty 上运行,并且 docker 容器易于管理。
答案2
从以下网址下载适当的版本:https://pkgs.org/download/cgroup-bin
通过安装sudo dpkg -i cgroup-bin_*.deb