Chinaunix首页 | 论坛 | 博客
  • 博客访问: 176856
  • 博文数量: 9
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 156
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-10 16:33
个人简介

在IT路上努力奔跑的少年。

文章分类

全部博文(9)

文章存档

2015年(3)

2014年(6)

我的朋友

分类: 系统运维

2015-04-03 09:09:55

    环境:
    Red Hat 4.x
    需要安装:apr-*、apr-util-*、pcre-*、openssl-*、httpd-*。
   编译apr-----OK
    编译apr-util--OK
    编译pcre----OK
    编译openssl---出现报错
    #./config --prefix=/usr/local/openssl
/usr/local/ssl/lib/libcrypto.a(md5_dgst.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value
感到好诡异,之前在centos 6上编译很顺利,难道是版本太低造成的?还是缺少些参数?或是依赖包?
为了解决这个问题,只好百度、google,
有人提到在#./config 后加上--enable-shared。
也有人提出要加上with -fPIC。
一时间懵了,尼玛有两种解决方法,只好乖乖的一种种尝试。
1.with -fPIC 编译后,问题还是存在------失败
2.--enable-shared 加上参数后,提示
 ./Configure
Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
看到提示也是醉了,难道是我打开的姿势不对?
3.改用-enable-shared,编译----- 成功。
#./config -enable-shared --prefix=/usr/local/openssl

阅读(1736) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~