如何在 Debian/kFreeBSD 上安装 lsof?

如何在 Debian/kFreeBSD 上安装 lsof?

如何在 Debian/kFreeBSD 测试(Wheezy/Sid)上安装 lsof?

$ apt-get install lsof
Package lsof 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
E: Package 'lsof' has no installation candidate

编辑:/etc/apt/sources.list:

deb http://http.debian.net/debian/ testing main contrib non-free
deb-src http://http.debian.net/debian/ testing main contrib non-free

deb http://security.debian.org testing/updates main contrib non-free
deb-src http://security.debian.org testing/updates main contrib non-free

答案1

该软件包lsof不是 Debian 的 kFreeBSD 变体的一部分,可以在此处确认:Debian 软件搜索

或许套接字状态在此情况下会很有帮助。Sockstat 会为您提供有关已打开套接字的信息,例如哪个进程/命令正在使用它。

相关内容