|
发表于 2021-4-8 12:34:33
9362 浏览 1 回复
fatal error: openssl/bio.h
出现这个或者fatal error: openssl/名单.h: No such file or directory。都是没有安装libssl-dev~
libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现~
解决方案:
- 使用sudo apt-get install libssl-dev来安装libssl-dev即可
复制代码
|
|
手机微信同号:13682654092
|
|
|
|
|
|
楼主|
发表于 2021-7-14 20:36:44
- tangh@XY13:/sda2/tangh/sprd/sprdroidr_trunk_20a$ sudo apt-get install zlib1g-dev
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- Some packages could not be installed. This may mean that you have
- requested an impossible situation or if you are using the unstable
- distribution that some required packages have not yet been created
- or been moved out of Incoming.
- The following information may help to resolve the situation:
- The following packages have unmet dependencies:
- zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-1ubuntu1) but 1:1.2.8.dfsg-1ubuntu1.1 is to be installed
- E: Unable to correct problems, you have held broken packages.
复制代码
解决方案:
- sudo apt-get install aptitude
- sudo aptitude install libssl-dev
- dpkg -l *libssl*
复制代码
执行sudo aptitude install libssl-dev前,可以先查看下工具安装情况,我的安装情况如下:
- tangh@XY13:/sda2/tangh/sprd/sprdroidr_trunk_20a$ dpkg -l *libssl*
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-=============================================================-===================================-=================
- un libssl-dev <none> <none> (no description available)
- ii libssl-doc 1.0.1f-1ubuntu2 all Secure Sockets Layer toolkit - development documentation
- ii libssl1.0.0:amd64 1.0.1f-1ubuntu2.16 amd64 Secure Sockets Layer toolkit - shared libraries
复制代码 明显看到信息:un libssl-dev <none> <none> (no description available)
然后执行安装指令:
sudo aptitude install libssl-dev
注意在安装过程中会提示是否安装或者是否覆盖,请看清楚后再选择,以下是我们的安装过程
- tangh@XY13:/sda2/tangh/sprd/sprdroidr_trunk_20a$ sudo aptitude install libssl-dev
- The following NEW packages will be installed:
- libssl-dev{b} zlib1g-dev{ab}
- 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
- Need to get 1,250 kB of archives. After unpacking 6,764 kB will be used.
- The following packages have unmet dependencies:
- zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-1ubuntu1) but 1:1.2.8.dfsg-1ubuntu1.1 is installed.
- Breaks: zlib1g-dev:i386 (!= 1:1.2.8.dfsg-1ubuntu1) but 1:1.2.8.dfsg-1ubuntu1.1 is installed.
- zlib1g-dev:i386 : Breaks: zlib1g-dev (!= 1:1.2.8.dfsg-1ubuntu1.1) but 1:1.2.8.dfsg-1ubuntu1 is to be installed.
- libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.16 is installed.
- The following actions will resolve these dependencies:
- Keep the following packages at their current version:
- 1) libssl-dev [Not Installed]
- 2) zlib1g-dev [Not Installed]
- Accept this solution? [Y/n/q/?] n
- The following actions will resolve these dependencies:
- Downgrade the following packages:
- 1) libssl1.0.0 [1.0.1f-1ubuntu2.16 (now) -> 1.0.1f-1ubuntu2 (trusty)]
- 2) zlib1g [1:1.2.8.dfsg-1ubuntu1.1 (now) -> 1:1.2.8.dfsg-1ubuntu1 (trusty)]
- 3) zlib1g:i386 [1:1.2.8.dfsg-1ubuntu1.1 (now) -> 1:1.2.8.dfsg-1ubuntu1 (trusty)]
- 4) zlib1g-dev:i386 [1:1.2.8.dfsg-1ubuntu1.1 (now) -> 1:1.2.8.dfsg-1ubuntu1 (trusty)]
- Accept this solution? [Y/n/q/?] y
- The following packages will be DOWNGRADED:
- libssl1.0.0 zlib1g zlib1g:i386 zlib1g-dev:i386
- The following NEW packages will be installed:
- libssl-dev zlib1g-dev{a}
- 0 packages upgraded, 2 newly installed, 4 downgraded, 0 to remove and 0 not upgraded.
- Need to get 2,370 kB of archives. After unpacking 6,752 kB will be used.
- Do you want to continue? [Y/n/?] y
- Get: 1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main zlib1g-dev i386 1:1.2.8.dfsg-1ubuntu1 [181 kB]
- Get: 2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main zlib1g i386 1:1.2.8.dfsg-1ubuntu1 [57.5 kB]
- Get: 3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main zlib1g amd64 1:1.2.8.dfsg-1ubuntu1 [57.1 kB]
- Get: 4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libssl1.0.0 amd64 1.0.1f-1ubuntu2 [825 kB]
- Get: 5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main zlib1g-dev amd64 1:1.2.8.dfsg-1ubuntu1 [183 kB]
- Get: 6 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libssl-dev amd64 1.0.1f-1ubuntu2 [1,066 kB]
- Fetched 2,370 kB in 3s (630 kB/s)
复制代码 安装完成之后,在执行指令:dpkg -l *libssl*,得到如下结果;
- tangh@XY13:/sda2/tangh/sprd/sprdroidr_trunk_20a$ dpkg -l *libssl*
- Desired=Unknown/Install/Remove/Purge/Hold
- | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
- |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
- ||/ Name Version Architecture Description
- +++-=============================================================-===================================-=================
- ii libssl-dev:amd64 1.0.1f-1ubuntu2 amd64 Secure Sockets Layer toolkit - development files
- ii libssl-doc 1.0.1f-1ubuntu2 all Secure Sockets Layer toolkit - development documentation
- ii libssl1.0.0:amd64 1.0.1f-1ubuntu2 amd64 Secure Sockets Layer toolkit - shared libraries
复制代码
ii libssl-dev:amd64 1.0.1f-1ubuntu2 amd64 Secure Sockets Layer toolkit - development files
libssl-dev已经安装成功
|
|
手机微信同号:13682654092
|
|
|
|
|
登录或注册
|