Mac 编译安装libimobiledevice出现openssl头文件找不到问题

问题描述

In file included from debug.c:36:
../src/idevice.h:30:10: fatal error: ‘openssl/ssl.h’ file not found
include

更新openssl

参考这里更新
其中软连接之后,重启一下终端,通过命令
openssl version查看版本是否已经更新,如果安装完发现还是旧的,去看看/etc/paths/usr/local/bin这个路径是否在/usr/bin之前

然后更新一下 ~/.bash_profile

替换为你安装openssl的地方,通常为/usr/local/Cellar/openssl/1.0.2n

LD_LIBRARY_PATH=/lib:"${LD_LIBRARY_PATH}"
CPATH=/include:"${CPATH}"
PKG_CONFIG_PATH=/lib/pkgconfig:"${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH

然后source ~/.bashrc,再编译应该就可以了

你可能感兴趣的:(ios)