问题
I am compiling php7 from source and have pre compiled a number of dependencies in /home/mybin
for example I have openssl in
/home/mybin/bin/openssl
/home/mybin/include/openssl/*.h
I have also readline as
/home/mybin/include/readline/readline.h
using the php compile options
./configure \
CC=/home/mybin/bin/gcc \
--prefix=/home/_cgi/php7 \
--bindir=/home/mybin/bin \
--libdir=/home/mybin/lib \
--with-libdir=/home/mybin/lib64 \
--includedir=/home/mybin/include \
--include-openssl \
i have tried the following options for readline
--with-readline=/home/mybin/include/readline
OR
--with-readline=/home/mybin/
OR
--with-readline
all variations end with configure: error: Please reinstall readline - I cannot find readline.h
All other dependencies built from source and in /home/mybin
are found no problem. Can you suggest what flag I sould set so readline.h
can be found?
thx Art
回答1:
please see http://stackoverflow.com/questions/35891777/linux-correct-flag-to-pass-gcc-mcrypt-h-location for a good description of how to fix this issue as both are related
回答2:
for readline you need to install
sudo apt install -y libedit-dev libreadline-dev
回答3:
On Debian-9 first, I installed libreadline-dev
package using
apt-get install libreadline-dev
and then when searching for the path of readline.h
using command
dpkg -S readline.h
It gave me below output:
nodejs: /usr/share/doc/nodejs/api/readline.html
libreadline-dev:amd64: /usr/include/readline/readline.h
So the file is located in /usr
directory
Finally I configured php
using --with-readline=/usr
and everything was fine.
来源:https://stackoverflow.com/questions/35879203/linux-php-7-configure-error-please-reinstall-readline-i-cannot-find-readline