Htop安装失败

我试图安装htop ,但我不能,因为我得到这个致命的错误:

 # cd /usr/ports/sysutils/htop && make install clean ===> Installing for htop-1.0.1 ===> htop-1.0.1 depends on executable: lsof - not found ===> Verifying install for lsof in /usr/ports/sysutils/lsof ===> Configuring for lsof-4.86B,6 Creating ./lockf_owner.h from /usr/src/sys/kern/kern_lockf.c FATAL ERROR: can't read /usr/src/sys/kern/kern_lockf.c FATAL ERROR: ./lockf_owner.h creation failed (see 00FAQ) ===> Script "Configure" failed unexpectedly. Please report the problem to [email protected] [maintainer] and attach the "/usr/ports/sysutils/lsof/work/lsof_4.86B.freebsd/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (eg an `ls /var/db/pkg`). *** Error code 1 Stop in /usr/ports/sysutils/lsof. *** Error code 1 Stop in /usr/ports/sysutils/htop. *** Error code 1 Stop in /usr/ports/sysutils/htop. 

这是什么意思,我该如何解决?

你看错误消息提示00FAQ吗? 问题8.6描述了你的情况,以及如何解决这个问题。

如果您不想在您的机器上安装内核源代码,解决方法是安装lsof二进制包

 pkg_add -r lsof 

考虑到lsof是htop的依赖关系,而你遇到的问题是无法读取和/或创build文件,安装过程中可能需要lsof的服务。 或者安装lsof或者如果已经安装,则在/usr/ports/sysutils/lsoflsof创build一个硬链接。

htop据我所知有linuxulator作为依赖。 它在这里找不到的是内核源代码中的东西。 检查/ usr / src中是否有任何内容。 如果不是的话,你应该使用csup检出属于那里的源代码集合。