最近 Debian 11 をインストールし、 を含むパッケージが見つからないところまでいじり始めましたapt
。たとえば、 を実行すると、sudo apt install ifconfig
が返されますE: Unable to locate package ifconfig
。おそらく私のファイルに何らかの影響があるはずだと、何ページにもわたって読みましたsources.list
。
ファイルを確認しましたが、すべて問題ないようです。内容sources.list
:
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-f>
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib n>
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
#buster-backports
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb http://archive.debian.org/debian stretch main contrib non-free
これを修正できる可能性がある手がかりを持っている人はいますか?
出力は次のようLC_ALL=C sudo apt update
になります。
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian buster-backports InRelease
Ign:5 http://archive.debian.org/debian stretch InRelease
Hit:6 http://archive.debian.org/debian stretch Release
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
出力は次のようLC_ALL=C apt search ifconfig
になります。
Sorting... Done
Full Text Search... Done
gnome-nettool/oldstable 3.8.1-3 amd64
network information tool for GNOME
inetutils-tools/oldstable 2:2.0-1+deb11u1 amd64
base networking utilities (experimental package)
iproute2/oldstable,now 5.10.0-4 amd64 [installed]
networking and traffic control tools
libnet-ifconfig-wrapper-perl/oldstable 0.26-1 all
multiplatform Perl wrapper for ifconfig
libnet-interface-perl/oldstable 1.016-1+b5 amd64
Perl module for manipulating host network interfaces
libsys-hostip-perl/oldstable 2.120-1 all
Perl module to determine local machine's IP address
moreutils/oldstable 0.65-1 amd64
additional Unix utilities
net-tools/oldstable 1.60+git20181103.0eebece-1 amd64
NET-3 networking toolkit
python-sh/oldoldstable 1.11-1 all
Python subprocess interface
python3-sh/oldstable 1.14.1-1 all
Python 3 subprocess interface
wmifinfo/oldstable 0.11-1 amd64
Dockapp that shows information for all interfaces
答え1
見た目sources.list
は良いし、apt update
機能apt search
も良好です。
sudo apt install ifconfig
返される理由E: Unable to locate package ifconfig
は、 という名前のパッケージが存在しないためですifconfig
。
読んでくださいどのパッケージがファイルを所有しているかを調べるにはどうすればよいですか?実行ファイルの名前ifconfig
という名前のパッケージにありますnet-tools
. これで動作し、次の結果が得られますifconfig
:
sudo apt install net-tools
apt search ifconfig
このパッケージは他のいくつかのパッケージとともに見つかりました。「 」を含むパッケージが見つからないというあなたの主張は不当apt
であるように思われます。
* これらはnon-f>
、実際のテキストではなく、行を切り捨てたときに出力されるn>
もの(または別のテキストエディタ)を投稿した結果であると思われます。nano sources.list
満杯の内容sources.list
。