configure: error: Cannot find enchant
php 5.6.25 installed successfully into /opt/phpbrew/php/5.6.25
root@server1:/opt/phpbrew# phpbrew --debug install 5.6.25 +all
*WARNING* You're runing phpbrew as root/sudo. Unless you're going to install
system-wide phpbrew or this might cause problems.
===> phpbrew will now build 5.6.25
---> Parsing variants from command arguments '+all'
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: f63b9956c25f1ae0433015a80b44224c
===> Distribution file was successfully extracted, skipping...
Source Directory: /opt/phpbrew/build/php-5.6.25
Writing variant info to /opt/phpbrew/php/php-5.6.25/phpbrew.variants
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Enabled variants: [all, xml, opcache]
Disabled variants: []
Found existing build.log, renaming it to /opt/phpbrew/build/php-5.6.25/build.log.1471903675
===> Configuring 5.6.25...
Use tail command to see what's going on:
$ tail -F /opt/phpbrew/build/php-5.6.25/build.log
./configure '--cache-file='\''/opt/phpbrew/cache/config.cache'\''' '--prefix=/opt/phpbrew/php/php-5.6.25' '--with-config-file-path=/opt/phpbrew/php/php-5.6.25/etc' '--with-config-file-scan-dir=/opt/phpbrew/php/php-5.6.25/var/db' '--with-libdir=lib/x86_64-linux-gnu' '--enable-all' '--enable-dom' '--enable-libxml' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-xsl' '--with-libxml-dir=/usr' '--enable-opcache' '--with-pear=/opt/phpbrew/php/php-5.6.25/lib/php' >> /opt/phpbrew/build/php-5.6.25/build.log 2>&1
Error: Configure failed:
The last 5 lines in the log file:
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for ENCHANT support... yes
configure: error: Cannot find enchant
Please checkout the build log file for more details:
tail /opt/phpbrew/build/php-5.6.25/build.log
root@server1:/opt/phpbrew#
gist here
tail of build log...
checking if the location of ZLIB install directory is defined... no
checking for zlib version >= 1.2.0.4... 1.2.7
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... yes
checking for BZip2 in default path... found in /usr
checking for BZ2_bzerror in -lbz2... yes
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking for cURL in default path... found in /usr
checking for cURL 7.10.5 or greater... libcurl 7.26.0
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... cc -E
checking for openssl support in libcurl... no
checking for gnutls support in libcurl... yes
checking gcrypt.h usability... yes
checking gcrypt.h presence... yes
checking for gcrypt.h... yes
checking for curl_easy_perform in -lcurl... yes
checking for curl_easy_strerror in -lcurl... yes
checking for curl_multi_strerror in -lcurl... yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for TCADB support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... builtin
checking for INI File support... builtin
checking for FlatFile support... builtin
checking whether to enable DBA interface... yes
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking for ENCHANT support... yes
configure: error: Cannot find enchant
OS: Debian 7 Wheezy
Running PHP:
PHP 5.4.45-1~dotdeb+7.1 (cli) (built: Sep 4 2015 23:38:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Installing PHP: 5.6.25
it's not a bug relating to phpbrew nor php itself. you need the header files to compile.
try sudo apt-get install libenchant-dev
@jhdxr Thanks, libenchant-dev plus 4 more packages and 2 links are needed, but there is now a new error. phpbrew install 5.5 still fails because the imap client c-client was build with ssl support so configure wants a flag added to its command line: configure: error: This c-client library is built with SSL support. Add --with-imap-ssl to your configure line.
~$: sudo apt-get install libenchant-dev libgmp-dev php5-gmp libgmp3-dev libc-client-dev
~%: ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
~$: ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
~$: phpbrew install 5.5 +all +kerberos
*WARNING* You're runing phpbrew as root/sudo. Unless you're going to install
system-wide phpbrew or this might cause problems.
===> phpbrew will now build 5.5.38
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: 312244a0eecad602a1555ed2434e223f
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/opt/phpbrew/build/php-5.5.38' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Found existing build.log, renaming it to /opt/phpbrew/build/php-5.5.38/build.log.1477519295
===> Configuring 5.5.38...
Use tail command to see what's going on:
$ tail -F /opt/phpbrew/build/php-5.5.38/build.log
Error: Configure failed:
The last 5 lines in the log file:
checking for crypt in -lcrypt... yes
configure: error: This c-client library is built with SSL support.
Add --with-imap-ssl to your configure line. Check config.log for details.
Please checkout the build log file for more details:
tail /opt/phpbrew/build/php-5.5.38/build.log
~$:
References:
https://gooroo.io/GoorooTHINK/Article/17003/Installing-PHP-7-MySQLMariaDB-and-Apache-on-Debian-8-or-CentOS-7/24769#.WBEfl1wkGKE
http://www.howtodoityourself.org/fix-error-utf8_mime2text.html
https://www.howtoforge.com/how-to-use-multiple-php-versions-php-fpm-and-fastcgi-with-ispconfig-3-ubuntu-12.04-lts-p3
@chris001 Thank you for your detailed report: I had to entirely reproduce your experience in order to get the same error message. Let me share my solution to fix it:
phpbrew install 5.5 +all +kerberos -- --with-imap-ssl
As easy as this. Taken from here: https://github.com/phpbrew/phpbrew/issues/749#issuecomment-234134008 . Though I keep receiving other errors - this one is fixed.
My further error was Configure: Error: Libgds, Libib_util or Libfbclient not found. I've tried installing libfbclient2 - but it didn't help.
After that I just decided to avoid installing +all as it is redundant - and went with just this:
phpbrew install 5.5 +default +mysql +sqlite +apxs2 +intl
And all errors had gone, it started building.
Most helpful comment
it's not a bug relating to phpbrew nor php itself. you need the header files to compile.
try
sudo apt-get install libenchant-dev