PHP Config --bindir

When using the following configuration flags below, the following error message is displayed: why is this? Obviously, the directory exists. This is a PHP 5.2.9 installation on a 64-bit 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' \
'- no-odbc' \
'--disable-dom' \
'--disable-dba' \
'- no-unixODBC' \
'--disable-pdo' \
'--disable-xmlreader' \
'--disable-xmlwriter' \
'--disable-JSON'

+4
source share
4 answers

Thanks for answers. As it turned out, the problem was the script that was used to invoke it. / configure. Inside the script itself, there was extra space above the bindir configuration flag. So that...

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

Thus, the escape character avoided the space, not the return.

uh.

Hope this helps someone lose the second day, trying to dig deeper than the obvious.

+1
source

I'm not quite sure why you get the error message, but I believe that options like --host, --target, --build, etc. output as a result of the configuration process and therefore do not need to be installed. It can build correctly if you want the configuration process to gather such information. Try to remove all the parameters that are set by default or which you do not need to explicitly change.

0
source

Are you setting the correct permissions? Trying to use sudo.

0
source

A very useful result of the configure command. Running configure does not require any permissions except for the directory containing your php source. You need only root to run "make install". You have verified that you have all the files in this directory. You can try to run

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

Even running configure with an invalid bindir completed for me. I tested with php 5.2.9, but I have a 32-bit OS.

0
source

All Articles