4
votes

When using the following configure flags below, the following error is reported, why is this? Obviously the directory exists. This is a PHP 5.2.9 install on a 64bit CentOS 5.2 OS.

./phpconfig.scr: line 11: --bindir=/usr/bin: No such file or directory

'./configure' \
'--host=x86_64-redhat-linux-gnu' \
'--build=x86_64-redhat-linux-gnu' \
'--target=x86_64-redhat-linux' \
'--program-prefix=' \
'--prefix=/usr' \
'--exec-prefix=/usr' \
'--bindir=/usr/bin' \
'--sbindir=/usr/sbin' \
'--sysconfdir=/etc' \
'--datadir=/usr/share' \
'--includedir=/usr/include' \
'--libdir=/usr/lib64' \
'--libexecdir=/usr/libexec' \
'--localstatedir=/var' \
'--sharedstatedir=/usr/com' \
'--mandir=/usr/share/man' \
'--infodir=/usr/share/info' \
'--cache-file=../config.cache' \
'--with-libdir=lib64' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc/php.d' \
'--disable-debug' \
'--with-pic' \
'--disable-rpath' \
'--without-pear' \
'--with-bz2' \
'--with-curl' \
'--with-exec-dir=/usr/bin' \
'--with-freetype-dir=/usr' \
'--with-png-dir=/usr' \
'--enable-gd-native-ttf' \
'--without-gdbm' \
'--with-gettext' \
'--with-gmp' \
'--with-iconv' \
'--with-jpeg-dir=/usr' \
'--with-openssl' \
'--with-png' \
'--with-pspell' \
'--with-expat-dir=/usr' \
'--with-pcre-regex=/usr' \
'--with-zlib' \
'--with-layout=GNU' \
'--enable-exif' \
'--enable-ftp' \
'--enable-magic-quotes' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-sysvmsg' \
'--enable-track-vars' \
'--enable-trans-sid' \
'--enable-yp' \
'--enable-wddx' \
'--with-kerberos' \
'--enable-ucd-snmp-hack' \
'--with-unixODBC=shared,/usr' \
'--enable-memory-limit' \
'--enable-shmop' \
'--enable-calendar' \
'--enable-dbx' \
'--enable-dio' \
'--without-mime-magic' \
'--without-sqlite' \
'--with-libxml-dir=/usr' \
'--with-xml' \
'--with-apxs2=/usr/sbin/apxs' \
'--without-mysql' \
'--without-gd' \
'--without-odbc' \
'--disable-dom' \
'--disable-dba' \
'--without-unixODBC' \
'--disable-pdo' \
'--disable-xmlreader' \
'--disable-xmlwriter' \
'--disable-json'

4
2 things, did you check to see if any other versions compile correctly? And also, did you ensure that you have write access to /usr/bin?Suroot

4 Answers

2
votes

Thanks for the responses. As it turns out the issue was with the script that was used to actually call ./configure. Within the script itself there was an extra space above the bindir config flag. So...

'--exec-prefix=/usr' \_<-The extra space indicated by the underscore.
'--bindir=/usr/bin' \

So the escape character was escaping a space and not a return.

ERRR.

Hopefully this will help someone else from loosing a afternoon trying to dig deeper than the obvious.

0
votes

I'm not exactly sure why you're getting the error, but I believe the parameters such as --host, --target, --build, etc are inferred by the configure process and therefore don't need to be set. It might build correctly if you were to let the configure process gather such information. Try removing all the options which are either set by default or which you don't need to change explicitly.

0
votes

Are you installing with correct permissions? Trying using sudo.

0
votes

The full output from running the configure command would be useful. Running the configure command doesn't require any permissions except to the directory containing your php source. You should only need to be root to run the "make install". Have you verified you own all the files in that directory. You can try running

"sudo chown -R [youruser]:[yourgroup] ."

Even running the configure command with an invalid bindir completes for me. I tested using php 5.2.9 but I'm running a 32bit OS.