dh_make: command not found, dpkg-depcheck: command not found 解决方法

本文介绍了如何解决在Debian系统中遇到的dh_make和dpkg-depcheck命令未找到的问题。对于dh_make,首先需要安装debhelper包,并确保使用正确的名称dh-make。对于dpkg-depcheck,可以通过安装devscripts包来解决。这些步骤有助于在Debian环境下顺利进行软件包的构建。

dh_make: command not found 

dpkg-depcheck: command not found 


解决方法


1. dh_make:

使用apt-get install dh_make安装时应该会报如下错误:
E: Couldn't find package dh_make

原因有两个,

第一:dh_make依赖于debhelper包,首先从源安装debhelper;

第二:dh_make其实是dh-make(注意,中间是减号 ‘-’)。


2.dpkg-depcheck:

如果使用apt-get install dpkg-depcheck也会报E: Couldn't find package dpkg-depcheck的错误,我们只需要安装devscripts就可以了,

sudo apt-get install devscripts。

至于为什么要安装devscripts,我查了一下:

A.6.7. dpkg-depcheck

dpkg-depcheck (from the devscripts package, Section A.6.1, “devscripts”) runs a command under strace to determine all the packages that were used by the said command.

For Debian packages, this is useful when you have to compose a Build-Depends line for your new package: running the build process through dpkg-depcheck will provide you with a good first approximation of the build-dependencies. For example:

dpkg-depcheck -b debian/rules build

dpkg-depcheck can also be used to check for run-time dependencies, especially if your package uses exec(2) to run other programs.

For more information please see dpkg-depcheck(1)


参考:http://www.debian.org/doc/manual ... .html#dpkg-depcheck



博主所有文章已转自私人博客 Joe 的个人博客,谢谢关注!

在遇到 `threaded_server: command not found` 错误时,通常意味着系统无法找到该命令的可执行文件。以下是可能导致此问题的原因及对应的解决方案: ### 1. 检查命令名称和拼写错误 确保输入的命令名 `threaded_server` 是正确的,并且没有拼写错误。例如,确认是否应为 `threadedserver` 或其他类似的拼写形式。 ### 2. 确认相关软件是否已安装 `threaded_server` 可能是某个特定工具或框架的一部分,而不是操作系统默认提供的命令。可以通过以下方式检查是否安装了包含该命令的软件包: - **Debian/Ubuntu 系统**: ```bash dpkg -l | grep threaded_server ``` - **Red Hat/CentOS 系统**: ```bash rpm -qa | grep threaded_server ``` 如果发现没有安装相关软件,可以尝试从源代码编译安装或通过包管理器安装。 ### 3. 检查可执行文件路径是否在 `PATH` 中 系统通过 `PATH` 环境变量查找可执行文件。可以通过以下命令检查 `threaded_server` 的可执行文件路径是否包含在 `PATH` 中: ```bash echo $PATH ``` 如果发现可执行文件不在 `PATH` 中,可以将路径添加到 `PATH`: ```bash export PATH=$PATH:/path/to/threaded_server_directory ``` ### 4. 查找 `threaded_server` 可执行文件的位置 可以使用 `find` 或 `locate` 命令查找 `threaded_server` 的可执行文件位置: ```bash find / -name threaded_server 2>/dev/null ``` ### 5. 从源码编译安装 如果无法找到 `threaded_server`,可能是需要从源代码编译安装。以下是通用的编译步骤: ```bash git clone <repository-url> cd <directory-name> make sudo make install ``` ### 6. 检查是否为第三方工具 `threaded_server` 可能属于某个第三方库或框架,例如用于测试或网络服务的工具。在这种情况下,需要参考该工具的文档,确认其安装和使用方式。 ### 7. 确保脚本具有可执行权限 如果 `threaded_server` 是一个脚本(如 Python 或 Shell 脚本),请确保它具有可执行权限: ```bash chmod +x threaded_server ``` ###
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值