ubuntu configure: error: Cannot find ssl libraries

文章详细介绍了在使用Nagios NRPE进行安装时遇到SSL库未找到错误的问题,并提供了排查和解决方法,包括通过dpkg检查SSL库是否正确安装、使用ln命令创建符号链接等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[b]问题:[/b]
安装软件一直提示configure: error: Cannot find ssl libraries.百度后,所需软件挨着安装一遍还是报这个错.

[b]解决方式:[/b]
1.通过dpkg -L libssl-dev命令检查是否真安装了ssl,安装过的会有一个libssl.so文件.
2.通过link整到需要的目录就行.ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so

[b]参考:[/b]
转自:http://ubuntuforums.org/showthread.php?t=1975917

i have installed nagios and i want to install nrpe. While installing NRPE, when i execute (/home/abc/nrpe/configure)

Code:
./configure
it stops after reaching the following line

Code:
...
checking for type of socket size... size_t
checking for SSL headers... SSL headers found in /usr
checking for SSL libraries... configure: error: Cannot find ssl libraries
I have installed libssl-dev and openssl package as i found them as a solution for this error.

I tried the following option also

Code:
./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib
But the error remains.

What can be the possible solution for this ? I am using ubuntu 12.04 as my operating system. Thanks in advance.
Thanks & Regards
Ankur M Trapasiya
Advanced replyAdv Reply
May 8th, 2012#2
safwanlmu
safwanlmu is offlineFirst Cup of Ubuntu
Join Date
Sep 2011
Beans
2
Re: nagios- nrpe installation error(configure: error: Cannot find ssl libraries)

Make a link of the libssl.so.version to libssl.so. I was able to install nrpe using this on oneric.

cd /usr/lib

ln -s libssl.so.0.9.8 libssl.so
Advanced replyAdv Reply
May 8th, 2012#3
RHAnthony
RHAnthony is offline5 Cups of Ubuntu
Join Date
Apr 2007
Beans
Hidden!
Re: nagios- nrpe installation error(configure: error: Cannot find ssl libraries)

I am still having the issue as well after installing libssl-dev, and I also can not see any ssl files in /usr/lib


Code:
root@aspen:/usr/lib# sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@aspen:/usr/lib# ls libssl*
ls: cannot access libssl*: No such file or directory
root@aspen:/usr/lib#
I then put in this command
Code:
dpkg -L libssl-dev
... which showed a libssl.so inside of /usr/lib/x86_64-linux-gnu/

I made a link to it with:
Code:
ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so
..and then was able to configure and make my nrpe install!
<think>好的,我现在需要解决用户在配置软件时遇到的错误,具体是找不到所需的辅助文件compile和install-sh。用户提到了configure error,并且需要找到这些缺失文件的解决方案。首先,我得回忆一下常见的配置问题和相关的工具链。 首先,用户遇到的错误通常与autotools生成的配置脚本有关。Autotools包括autoconf、automake和libtool,这些工具用于生成可移植的构建脚本。当配置过程中提示缺少辅助文件如compile或install-sh时,通常是因为这些文件没有被正确生成或包含在项目中。 接下来,我应该考虑这些辅助文件的来源。这些文件通常由automake或autoreconf命令生成,存放在项目的autotools相关目录中,比如m4或build-aux。如果项目中没有这些文件,可能需要重新生成整个配置脚本。 可能的解决步骤包括: 1. 运行autoreconf命令来重新生成配置脚本和辅助文件。这可能需要安装autoconf、automake和libtool等工具。 2. 确保项目目录中包含必要的宏文件,比如通过aclocal来更新m4宏。 3. 检查是否缺少其他依赖工具,比如pkg-config,或者是否权限问题导致文件无法生成。 4. 如果项目是从版本控制系统(如Git)检出的,可能缺少通过autogen.sh或bootstrap脚本初始化的文件,需要运行这些脚本。 另外,引用中的内容提到使用libtool时需要注意替换变量,比如@LTLIBINTL@代替@LIBINTL@,这可能与库链接有关,但当前问题更可能是缺少辅助文件,所以重点在重新生成配置脚本。 用户可能没有正确运行autoreconf,或者项目没有包含必要的autotools文件。建议用户先尝试运行autoreconf -fiv,这会强制安装缺少的辅助文件。如果仍然失败,可能需要手动复制这些文件,或者检查项目的构建说明是否遗漏了初始化步骤。 还需要考虑系统是否安装了所有必要的开发工具,比如在Debian/Ubuntu上需要安装autoconf、automake、libtool等包。如果用户从源码构建,可能需要先安装这些依赖项。 最后,可能需要检查项目的configure.ac或Makefile.am文件是否有错误,但这种情况相对较少,除非用户自己修改了这些文件。如果用户刚刚从仓库中拉取代码,更可能的是缺少生成步骤,需要重新生成配置脚本。</think>要解决配置过程中出现的缺失`compile`和`install-sh`等辅助文件的问题,请按以下步骤操作: --- ### 1. **重新生成自动配置脚本** 运行以下命令生成缺失的辅助文件(需提前安装`autoconf`、`automake`和`libtool`): ```bash autoreconf -fiv ``` - `-f`:强制重新生成文件 - `-i`:安装缺失的辅助文件 - `-v`:显示详细过程 如果提示权限问题,可添加`sudo`执行[^3]。 --- ### 2. **检查依赖工具是否安装** 确保系统中已安装必要的开发工具: - **Debian/Ubuntu**: ```bash sudo apt-get install autoconf automake libtool make gcc ``` - **CentOS/RHEL**: ```bash sudo yum install autoconf automake libtool make gcc ``` --- ### 3. **手动补充缺失文件** 如果`autoreconf`仍无法生成文件,可手动从其他项目或系统目录复制: ```bash cp /usr/share/automake-1.16/install-sh . cp /usr/share/automake-1.16/compile . ``` (路径中的`1.16`需替换为实际安装的automake版本) --- ### 4. **检查项目初始化脚本** 如果项目通过`git clone`获取,可能存在未提交的配置脚本。尝试运行: ```bash ./autogen.sh # 或 ./bootstrap ``` 若存在这些脚本,需先赋予执行权限: ```bash chmod +x autogen.sh ``` --- ### 5. **验证文件路径配置** 确保`Makefile.am`中正确包含辅助文件目录: ```makefile AC_CONFIG_AUX_DIR([build-aux]) # 在configure.ac中添加此行 ``` 并检查是否配置了正确的头文件路径[^2]。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值