在编译nss时报错make :*** No rule to make target '.pl',needed by ' '
时间: 2024-08-16 10:06:09 浏览: 92
报这个错误通常表示在编译NSS (Network Security Services) 的过程中,Makefile 没有找到生成`.pl`文件所需的操作规则。这可能是由于以下几个原因:
1. 缺少必要的构建步骤:可能是你遗漏了某个构建阶段,比如先执行了`config`命令配置 NSS,然后忘记运行`make`来生成相应的源文件。
2. 文件路径问题:检查 Makefile 中的依赖文件路径是否正确,如果`.pl`文件不在预期位置,Makefile 就无法找到它。
3. 手动修改后的Makefile:如果你手动修改过 Makefile,可能会导致原有的构建规则失效。确认一下是否有误操作影响了原有构建流程。
4. 版本兼容性问题:有时候旧版本的工具或库可能不支持新的Makefile语法或结构。
解决方法:
- 首先查看错误提示,看看是否有明确指出需要哪些规则(如missing .pl targets),尝试按照文档提供的顺序重新执行构建过程。
- 确认所有依赖项都已经安装并正确设置环境变量。
- 如果是 Makefile 修改问题,尝试撤销更改或参照官方文档修复。
- 如果问题依然存在,可以尝试更新到最新版本的 NSS 或查找社区里的解决方案。
相关问题
安装curl报错make: *** No rule to make target `install'. Stop.
### 解决方案
当遇到`make: *** No rule to make target ‘install’. Stop.` 错误时,这通常意味着Makefile文件中缺少必要的构建指令或者当前目录下不存在有效的 Makefile 文件[^2]。
为了成功编译并安装 curl, 需要确保已经正确下载了源码包,并按照标准流程操作:
#### 准备工作环境
建议先通过yum更新系统软件包以及安装所需的依赖库:
```bash
yum update
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced
```
#### 下载并解压curl源代码
从官方网站获取最新版本的 tarball 并将其放置到服务器上适当的位置。接着执行如下命令来解开压缩包:
```bash
tar zxvf curl-*.tar.gz
cd curl-*/
```
#### 编译前配置
进入解压后的文件夹内运行 configure 脚本来设置编译参数:
```bash
./configure --prefix=/usr/local/curl
```
#### 执行编译过程
一旦完成上述准备工作,则可以继续进行实际的编译动作:
```bash
make
```
如果一切顺利的话,在此之后应该能够看到成功的提示信息而不是之前的错误消息。此时再尝试执行 `make install` 命令即可正常安装 curl 库及其工具集。
#### 安装
最后一步就是正式安装已编译好的程序至指定路径下了:
```bash
sudo make install
```
6月 09 21:52:17 localhost.localdomain systemd[1]: named.service: Control p> 6月 09 21:52:17 localhost.localdomain systemd[1]: named.service: Failed wi> -- Subject: Unit failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- The unit named.service has entered the 'failed' state with result 'exit> 6月 09 21:52:17 localhost.localdomain systemd[1]: Failed to start Berkeley> -- Subject: named.service 单元已失败 -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- named.service 单元已失败。 -- -- 结果为“failed”。 6月 09 21:52:17 localhost.localdomain systemd[1]: Reached target Host and > -- Subject: nss-lookup.target 单元已结束启动 -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- nss-lookup.target 单元已结束启动。 -- -- 启动结果为“done”。
根据日志信息,named 服务启动失败了,具体错误信息需要查看更详细的日志。您可以通过以下命令查看更详细的日志信息:
journalctl -u named.service
通过查看更详细的日志信息,您可能能够找到导致 named 服务启动失败的具体原因。例如,可能是由于 DNS 配置文件中存在语法错误,或者是由于 named 用户缺少必要的权限等原因导致的。
阅读全文
相关推荐
















