执行configure时遇到的问题如下:
configure: error: Package requirements (libffi >= 3.0.0) were not met:
No package 'libffi' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
首先看下是否安装了libffi:
rpm -qa | grep libffi
如果未安装, 请用yum命令安装, 如下:
sudo yum install libffi libffi-devel
再次执行configure命令, 如果还报同样的错误, 则指定参数LIBFFI_CFLAGS和LIBFFI_LIBS, 我执行的命令如下, 可以做个借鉴,:
./configure LIBFFI_CFLAGS='-I/usr/include' LIBFFI_LIBS='-L/usr/lib64 -lffi' // -L和/usr/lib64中间不能有空格
configure执行成功. 后续用make命令即可.