###前提・実現したいこと
OpenSSL 1.0.2系最新バージョンの 1.0.2k を CentOS 7 にインストールし、nginx といっしょに使いたいと考えています。
yum では古いバージョンがインストールされてしまうためソースからのインストールを試みたところ、次項の問題に遭遇しました。
###発生している問題・エラーメッセージ
まず、root ユーザにて下記手順でインストールを進めました。
- OpenSSL
cd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz tar xvf openssl-1.0.2k.tar.gz cd openssl-1.0.2k ./config make make test make install ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
- nginx
mkdir /root/work cd /root/work wget http://nginx.org/download/nginx-1.11.9.tar.gz tar xvfz nginx-1.11.9.tar.gz cd nginx-1.11.9/ ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --with-openssl=/usr/local/src/openssl-1.0.2k make
ここで、下記エラーが出力されてしまいました。
/usr/bin/ld: /usr/local/src/openssl-1.0.2k/.openssl/lib/libssl.a(s23_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
###試したこと
-fPIC オプションをつけて再コンパイルするようにとのエラーと読み取りましたので、下記のように前項 1) 手順で「-fPIC」オプションをつけて OpenSSL を再コンパイルして再試行しましたが、症状はかわらず同一のエラーが出力されてしまいます。
cd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz tar xvf openssl-1.0.2k.tar.gz cd openssl-1.0.2k ./config -fPIC make make test make install ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
以前、1.0.2h では同手順にて成功したので、1.0.2k 固有のバグかとも考えましたが、そういった情報もなかったため、なにか上記手順に誤りがあるとの考えに至っています。
###補足情報(言語/FW/ツール等のバージョンなど)
・CentOS 7
・OpenSSL 1.0.2k
・nginx 1.11.9
可能性として考えられること、解決の手続きをご存じのことなどご存じのかたがいらっしゃいましたら、どうかご助言願いたく存じます。
つたない説明で大変恐縮ではございますが、なにか不明瞭な点や必要な情報などがございます場合は、ご指摘願えましたら幸いでございます。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/20 17:14