Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to compile PHP 5.2.17 on CentOS 6.3.0 but If I use '--with-readline' I get this:

checking for readline support... yes
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
checking for readline in -lreadline... no
configure: error: readline library not found

I tried to use another compiled version of readline with this option:

--with-readline=/usr/local/readline

Same error. This is the dir of the custom readline:

# ls -l /usr/local/readline
total 16
drwxr-xr-x. 2 root root 4096 Aug 29 01:29 bin
drwxr-xr-x. 3 root root 4096 Aug 29 01:44 include
drwxr-xr-x. 2 root root 4096 Aug 29 01:29 lib
drwxr-xr-x. 5 root root 4096 Aug 29 01:29 share

It is there it is compiled. If I remove the '--with-readline' option I get:

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

I already have readline-devel:

Package readline-devel-6.0-4.el6.i686 already installed and latest version
share|improve this question
    
Did you try to clean the old config before re-running ./configure script? You can try make distclean. Also, you need to make sure the readline library is found in ldconfig paths. –  Khaled Aug 28 '12 at 14:02
    
Are you running both readline versions: one is compiled from source and another is installed via yum? Why not install newest PHP version via yum? –  quanta Aug 28 '12 at 14:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.