编译安装openssl-0.9.8e

1、开发编译器

ubuntu16 64位

2、下载安装包

openssl-0.9.8e.tar.gz

3、解压

tar -vxf openssl-0.9.8e.tar.gz

4、配置选项 (Configuration Options)

./Configure linux-elf no-asm --prefix=/work/my/code/openssl

 注意:--pefix 是绝对路径不能相对路径(如:../openssl)

5、编译

make

出现错误1:

gcc -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall   -c -o rc5test.o rc5test.c
rc5test.c:1:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token
 dummytest.c
          ^
<builtin>: recipe for target 'rc5test.o' failed
make[1]: *** [rc5test.o] Error 1
make[1]: Leaving directory '/work/my/code/openssl-0.9.8e_linux_porting-master/test'
Makefile:241: recipe for target 'build_tests' failed
make: *** [build_tests] Error 1
解决办法:

hjx@ubuntu16:/work/my/code/openssl-0.9.8e$ cd test/
hjx@ubuntu16:/work/my/code/openssl-0.9.8e/test$ ls
bctest       ecdhtest.c    ideatest.c     P1ss.cnf     sha256t.c    testp7.pem    treq
bftest.c     ecdhtest.o    ideatest.o     P2ss.cnf     sha512t.c    testreq2.pem  treq.com
bntest       ecdsatest     igetest.c      pkcs7-1.pem  shatest.c    testrsa.pem   trsa
bntest.c     ecdsatest.c   Makefile       pkcs7.pem    ssltest.c    tests.com     trsa.com
bntest.o     ecdsatest.o   maketests.com  r160test.c   Sssdsa.cnf   testsid.pem   tsid
CAss.cnf     ectest        md2test        randtest.c   Sssrsa.cnf   testss        tsid.com
CAssdh.cnf   ectest.c      md2test.c      rc2test      tcrl         testss.com    tverify.com
CAssdsa.cnf  ectest.o      md2test.o      rc2test.c    tcrl.com     testssl       tx509
CAssrsa.cnf  enginetest.c  md4test        rc2test.o    testca       testssl.com   tx509.com
casttest.c   evp_test.c    md4test.c      rc4test      testca.com   testsslproxy  Uss.cnf
destest.c    evptests.txt  md4test.o      rc4test.c    test.cnf     testx509.pem  v3-cert1.pem
dhtest.c     exptest.c     md5test        rc4test.o    testcrl.pem  times         v3-cert2.pem
dsatest.c    hmactest      md5test.c      rc5test.c    testenc      tpkcs7        VMSca-response.1
dummytest    hmactest.c    md5test.o      rmdtest.c    testenc.com  tpkcs7.com    VMSca-response.2
dummytest.c  hmactest.o    mdc2test.c     rsa_test.c   testgen      tpkcs7d
ecdhtest     ideatest      methtest.c     sha1test.c   testgen.com  tpkcs7d.com
hjx@ubuntu16:/work/my/code/openssl-0.9.8e/test$ rm rc5test.c 
hjx@ubuntu16:/work/my/code/openssl-0.9.8er/test$ make

出现错误2:

gcc -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall   -c -o mdc2test.o mdc2test.c
mdc2test.c:1:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token
 dummytest.c
          ^
<builtin>: recipe for target 'mdc2test.o' failed
make[2]: *** [mdc2test.o] Error 1
make[2]: Leaving directory '/work/my/code/openssl-0.9.8e_linux_porting-master/test'
Makefile:241: recipe for target 'build_tests' failed
make[1]: *** [build_tests] Error 1
make[1]: Leaving directory '/work/my/code/openssl-0.9.8e_linux_porting-master'
Makefile:100: recipe for target 'top' failed
make: *** [top] Error 2
解决方法:

hjx@ubuntu16:/work/my/code/openssl-0.9.8e_linux_porting-master/test$ rm mdc2test.c
hjx@ubuntu16:/work/my/code/openssl-0.9.8e_linux_porting-master/test$ make

问题出现的原因是:

mdc2test.c rc5test.c没有连接到 dummytest.c文件

删除前:

lrwxrwxrwx 1 hjx hjx      11 9月  22 13:56 rc5test.c
lrwxrwxrwx 1 hjx hjx      11 9月  22 14:04 mdc2test.c

删除编译后:

lrwxrwxrwx 1 hjx hjx      11 9月  22 13:56 rc5test.c -> dummytest.c
lrwxrwxrwx 1 hjx hjx      11 9月  22 14:04 mdc2test.c -> dummytest.c

6、安装

make install

出现错误

cms.pod around line 457: Expected text after =item, not a number
cms.pod around line 461: Expected text after =item, not a number
cms.pod around line 465: Expected text after =item, not a number
cms.pod around line 470: Expected text after =item, not a number
cms.pod around line 474: Expected text after =item, not a number
POD document had syntax errors at /usr/bin/pod2man line 69.
make: *** [install_docs] Error 1

解决方法:

rm-f /usr/bin/pod2man

重新安装编译。

7、安装结果

root@ubuntu16:/work/my/code/openssl# ls
bin  include  lib  ssl
root@ubuntu16:/work/my/code/openssl# ls include/
openssl
root@ubuntu16:/work/my/code/openssl# ls include/openssl/
aes.h       bn.h        crypto.h   dtls1.h   e_os2.h     kssl.h     obj_mac.h      pem.h        rc2.h        ssl23.h  symhacks.h   x509.h
asn1.h      buffer.h    des.h      ebcdic.h  err.h       lhash.h    ocsp.h         pkcs12.h     rc4.h        ssl2.h   tls1.h       x509v3.h
asn1_mac.h  cast.h      des_old.h  ecdh.h    evp.h       md2.h      opensslconf.h  pkcs7.h      ripemd.h     ssl3.h   tmdiff.h     x509_vfy.h
asn1t.h     comp.h      dh.h       ecdsa.h   hmac.h      md4.h      opensslv.h     pq_compat.h  rsa.h        ssl.h    txt_db.h
bio.h       conf_api.h  dsa.h      ec.h      idea.h      md5.h      ossl_typ.h     pqueue.h     safestack.h  stack.h  ui_compat.h
blowfish.h  conf.h      dso.h      engine.h  krb5_asn.h  objects.h  pem2.h         rand.h       sha.h        store.h  ui.h
root@ubuntu16:/work/my/code/openssl# 
root@ubuntu16:/work/my/code/openssl# ls lib/
engines  libcrypto.a  libssl.a  pkgconfig
root@ubuntu16:/work/my/code/openssl# 
root@ubuntu16:/work/my/code/openssl# ls bin/
c_rehash  openssl
root@ubuntu16:/work/my/code/openssl# 
root@ubuntu16:/work/my/code/openssl# 









  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 您好!要下载openssl-0.9.8i,您可以按照以下步骤进行: 1.打开您的浏览器,访问openssl官方网站。 2.在网站的主页或下载页面中,找到相应版本openssl-0.9.8i的下载链接。 3.点击下载链接并等待下载过程完成。 或者,您也可以选择通过命令行或终端下载openssl-0.9.8i,具体步骤如下: 1.打开命令行或终端窗口。 2.使用合适的命令进入您想要下载的目录。例如,输入cd /usr/local/以进入/usr/local目录。 3.使用wget或curl命令下载openssl-0.9.8i。例如,使用以下命令下载tar.gz文件: wget https://www.openssl.org/source/openssl-0.9.8i.tar.gz 4.等待下载完成,下载速度取决于您的网络连接状况。 5.下载完成后,您可以使用解压工具(如tar命令)解压缩tar.gz文件。例如,在命令行中输入以下命令: tar -zxvf openssl-0.9.8i.tar.gz 6.解压缩完成后,您可以根据需要对文件进行自定义设置或编译。通常,有一个叫做INSTALL或README的文件包含了具体的编译指南和安装说明。 希望以上步骤对您有所帮助,祝您下载成功! ### 回答2: 要下载 openssl-0.9.8i,您可以按照以下步骤进行: 1. 打开您的互联网浏览器,然后前往 OpenSSL 官方网站。 2. 在网站的导航菜单或搜索框中查找并选择 "Downloads"(下载)选项。 3. 在下载页面中找到 openssl-0.9.8i 的版本。通常下载链接会带有版本号和平台信息。 4. 单击下载链接开始下载。某些网站可能会要求您选择下载文件的存储位置或确认下载操作。 5. 下载完成后,使用文件管理器导航到下载的文件保存位置。 6. 双击下载的文件以解压缩它。在解压缩过程中,您可能需要选择解压缩的目标文件夹或确认解压缩操作。 7. 解压缩完成后,您可以在目标文件夹中找到 openssl-0.9.8i 的文件和文件夹。 请注意,我所提供的步骤是基于一般的下载流程。具体步骤可能会因下载来源和操作系统而有所不同。因此,最好在 OpenSSL 官方网站上寻找相关文档或指南,以确保正确下载 openssl-0.9.8i。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值