我正在按照此链接上的说明进行操作。这里有什么问题?
您没有按照说明进行操作。看来您错过了第 06 步:
06. cd into openssl-1.0.0c as follow...
sudo /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc --prefix=/usr no-threads shared
不要将make 与sudo 放在一起。试试这个:
/tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared
make -f /tmp/ssl/openssl-1.0.1h/Makefile
sudo make -f /tmp/ssl/openssl-1.0.1h/Makefile install
如果你先cd 进入/tmp/ssl/openssl-1.0.1h/,通常会更容易。然后它减少到:
tar xzf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
./Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared
make
sudo make install
您还可以使用以下方法来避免记住三连音:
export KERNEL_BITS=64
./config shared no-threads shared no-ssl2 ...
make install 后,OpenSSL 将安装在/usr/local/ssl 中,除非您将其更改为--openssldir 或––prefix。
sudo /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc --prefix=/usr no-threads shared
––prefix=/usr 可能会成为你的痛点。 Apple 附带 OpenSSL 0.9.8,它与 OpenSSL 1.0.1h 的二进制文件不兼容。将系统的 OpenSSL 版本替换为您的版本后,您应该会遇到无法解释的崩溃和无法解释的错误结果。
最后,在您sudo make install 之前,您应该make test 以确保一切正常。