怎么让php支持readline ?

问答中心分类: PHP怎么让php支持readline ?
chen asked 9 年 ago
怎么让php支持readline ,我尝试去弄出现php: symbol lookup error: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/readline.so: undefined symbol: append_history。不知如何解决

4 Answers
oneinstack answered 9 年 ago
yum install libedit-devel
cd oneinstack/src
tar xzf php-5.6.22.tar.gz
cd php-5.6.22/ext/readline
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

chen answered 9 年 ago
我的系统是ubuntu15.10,安装完,加入扩展还是出现那个问题
php: symbol lookup error: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/readline.so: undefined symbol: append_history

oneinstack answered 9 年 ago
centos7 测试通过

1053586878 answered 2 年 ago
扩展装好以后,开启扩展

echo -e "[readline]\nextension = readline.so" >> /usr/local/php/etc/php.ini