unable to read opensslv.h:No such file or directory

点点圈 提交于 2019-12-24 12:25:51

问题


I am getting the following error when I try to install OpenSSL version 1.0.1h on MAC OS (Mountain Lion) Terminal,

unable to read opensslv.h:No such file or directory

I am using the following command in the Terminal,

sudo /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared

I am following the instructions on this link. What is wrong here?


回答1:


I am following the instructions on this link. What is wrong here?

You did not follow the instructions. It looks like you missed step 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

Don't make with sudo. Try this:

/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

Its usually easier if you cd into /tmp/ssl/openssl-1.0.1h/ first. Then it reduces to:

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

You could also use the following to avoid memorizing the triplet:

export KERNEL_BITS=64
./config shared no-threads shared no-ssl2 ...

After make install, OpenSSL will be installed in /usr/local/ssl unless you change it with --openssldir or ––prefix.


sudo /tmp/ssl/openssl-1.0.1h/Configure darwin64-x86_64-cc ––prefix=/usr no-threads shared

––prefix=/usr is probably going to be a pain point for you. Apple ships with OpenSSL 0.9.8, which is not binary compatible with OpenSSL 1.0.1h. You should experience unexplained crashes and unexplained incorrect results once you replace the system's version of OpenSSL with your version.


Finally, before you sudo make install, you should make test to ensure everything is OK.



来源:https://stackoverflow.com/questions/24559703/unable-to-read-opensslv-hno-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!