Ubuntu10.04中编译openssl遇到的问题与解决

写在前面:

仅解决遇到的两个问题,安装即配置过程自行查询,推荐:传送门

root@est-desktop:/home/est/ACE_wrappers# uname -a

Linux est-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux

遇到的问题1:

openssl编译出错:

/usr/local/bin/perl bn_prime.pl >bn_prime.h /bin/sh: /usr/local/bin/perl: not found

解决:

需要安装编译环境:

由于ubuntu环境较old,所以需要更换源:传送门

sudo apt-get install build-essential

遇到的问题2:

bn_prime.c: In function ‘BN_is_prime_fasttest_ex’:

bn_prime.c:265: error: ‘NUMPRIMES’ undeclared (first use in this function)

bn_prime.c:265: error: (Each undeclared identifier is reported only once

bn_prime.c:265: error: for each function it appears in.)

bn_prime.c:266: error: ‘primes’ undeclared (first use in this function)

bn_prime.c: In function ‘probable_prime’:

bn_prime.c:380: error: ‘NUMPRIMES’ undeclared (first use in this function)

bn_prime.c:387: error: ‘primes’ undeclared (first use in this function)

bn_prime.c: In function ‘probable_prime_dh’:

bn_prime.c:431: error: ‘NUMPRIMES’ undeclared (first use in this function)

bn_prime.c:434: error: ‘primes’ undeclared (first use in this function)

bn_prime.c: In function ‘probable_prime_dh_safe’:

bn_prime.c:479: error: ‘NUMPRIMES’ undeclared (first use in this function)

bn_prime.c:484: error: ‘primes’ undeclared (first use in this function)

::就是说很多未定义的变量

解决:

win下解压0.9.8c的源码,用VScode打开发现这些变量都有定义,然后就顺手看了下linux中文件,令人诧异,竟然是空的

随后将win下解压的文件复制到linux下对应的位置,就OK了。

 

而后再回到编译目录

root@est-desktop:/home/est/openssl-0.9.8c#make clean

root@est-desktop:/home/est/openssl-0.9.8c#make

......

make[2]: Leaving directory `/home/est/openssl-0.9.8c/test'

make[1]: Leaving directory `/home/est/openssl-0.9.8c/test'

making all in tools...

make[1]: Entering directory `/home/est/openssl-0.9.8c/tools'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/home/est/openssl-0.9.8c/tools'

root@est-desktop:/home/est/openssl-0.9.8c#

root@est-desktop:/home/est/openssl-0.9.8c#make install

就安装OK

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值