Libnettle 3.1 was not found.报错的解决方案
解决方案 报错 not found was 3.1
2023-09-11 14:22:07 时间
0x00 背景
名称 | 版本 |
---|---|
操作系统 | CentOS 6.10 x64 |
GnuTLS库 | gnutls-3.5.19 |
gnutls依赖库 | nettle-3.4 |
gnutls依赖库 | gmp-6.1.2 |
安装gnutls前需要先安装两个依赖库,一个是gmp,另一个是nettle。安装完这两个依赖库后,准备安装gnutls,结果报错:
0x01 问题原因
nettle这货安装的时候,自己安装到了/usr/local/lib
目录下了。gnutls安装时默认会到系统目录下/usr/lib
下寻找依赖关系。
软件路径瞎按,系统依赖瞎找是问题的形成原因。
安装nettle结束后,没有跟我们说安装到哪里了,我们看下nettle的路径
find /usr -name '*nettle*'
0x02 问题修复
安装nettle时,通过--prefix
参数指定安装路径为/usr
cd /tmp/nettle-3.4 && ./configure --prefix=/usr/ && make && make install
再继续安装gnutls
cd /tmp/gnutls-3.5.19 &&
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig &&
./configure --enable-shared --with-included-libtasn1 \
--with-included-unistring --without-p11-kit &&
make &&
make install
安装成功
0x03 扩展思考
可能当前用户是普通用户,莫非sudo安装的路径就变成了/usr/local
,su的安装路径是/usr
[test@bogon tmp]$ sudo echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/test/bin
[test@bogon tmp]$ su
Password:
[root@bogon tmp]# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/test/bin
系统PATH的路径是完全相同的。所以不是用户属性控制的。
查下./configure
的用法
[root@bogon nettle-3.4]# ./configure --help
`configure' configures nettle 3.4 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
安装路径抓虾的真正原因是./configure
默认是安装到/usr/local
下的。
0x04 小结
- 第三方软件linux系统推荐安装到
/usr/local
路径下 - 先make uninstall卸载掉安装错的nettle,但是报错了
相关文章
- ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE.win10报错解决方案
- 对已经发布的ASP.NET网站加.aspx页面,浏览报错404?解决方案
- 【Vue/Js】如何解决谷歌浏览器(chrome)扩展插件安装后,再打开自动消失问题(两种解决方案)
- Google Earth Engine(GEE)——错误的解决方案(调试方法)!
- SQL SERVER错误:已超过了锁请求超时时段。 (Microsoft SQL Server,错误: 1222) 解决方案
- hzerojs 安装依赖报错 解决方案
- 微信小程序 - 页面跳转传参 JSON.parse 解析失败报错(SyntaxError: Unexpected end of JSON input)解决方案
- vue 试图改变子组件props 属性值时,控制台报错解决方案
- 添加了环境变量,然而交叉编译器还是无法运行的解决方案
- Centos 7安装python3,pip超详细过程,以及各种报错解决方案
- 【HMS core】【Analytics Kit 解决方案】为何华为分析SDK在初始化之前就会获取已安装的应用列表?
- 【报错】failed to run custom build command for `openssl-sys v0.9.75` 解决方案
- 【多服务场景化解决方案】短视频剪辑(ShortVideoCreator)
- 之前的Android项目报错,新建Android项目报错,代码中找不到错误解决方案
- 老旧小区改造,智慧社区解决方案应用其中
- Unity 之 发布PC端CPU高占用温度高的问题解决方案
- 报错no required module provides package github.com/xx的解决方案
- kali更新报错An error occurred during the signature verification的解决方案
- Windows PowerShell 中启动 Nginx 报错解决方案