hdknr / note

Markdown Texts
http://qiita.com/hidelafoglia
7 stars 1 forks source link

phpenv: make: *** [sapi/cgi/php-cgi] Error 1 #44

Closed hdknr closed 6 years ago

hdknr commented 6 years ago
$ phpenv install 7.0.6
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.0.6 into /home/vagrant/.anyenv/envs/phpenv/versions/7.0.6
[Downloading]: https://secure.php.net/distributions/php-7.0.6.tar.bz2
[Preparing]: /tmp/php-build/source/7.0.6
[Compiling]: /tmp/php-build/source/7.0.6

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
collect2: error: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
-----------------------------------------

The full Log is available at '/tmp/php-build.7.0.6.20170803174706.log'.
[Warn]: Aborting build.
hdknr commented 6 years ago
$ apt-get install  re2c
-----------------------------------------
collect2: error: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
-----------------------------------------
hdknr commented 6 years ago
$ openssl version
OpenSSL 1.0.1t  3 May 2016
hdknr commented 6 years ago

ubuntu 17.04 php7.0.6

-----------------------------------------
configure: WARNING: This bison version is not supported for regeneration of the Zend/PHP parsers (found: none, min: 204, excluded: ).
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
-----------------------------------------

libcurl4-gnutls-dev

$ cd /usr/local/include
$ sudo ln -s /usr/include/x86_64-linux-gnu/curl curl
$ sudo apt-get install libcurl4-gnutls-dev

libjpeg9-dev

-----------------------------------------
configure: WARNING: This bison version is not supported for regeneration of the Zend/PHP parsers (found: none, min: 204, exc
luded: ).                                               
configure: error: jpeglib.h not found.                                                 
----------------------------------------- 

libmcrypt-dev

libtidy-dev

phpdbg_output_pager

-----------------------------------------
   write(STDERR_FILENO, buf, len);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.0.6/sapi/phpdbg/phpdbg_io.c: In function 'phpdbg_output_pager':
/tmp/php-build/source/7.0.6/sapi/phpdbg/phpdbg_io.c:206:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
     write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---"));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-build/source/7.0.6/sapi/phpdbg/phpdbg_io.c:211:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
     write(sock, "\r", 1);
     ^~~~~~~~~~~~~~~~~~~~
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
-----------------------------------------
$ sudo apt-get install autoconf automake -y
$ phpenv install 7.0.6                                          
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 7.0.6 into /home/vagrant/.anyenv/envs/phpenv/versions/7.0.6
[Skipping]: Already downloaded and extracted https://secure.php.net/distributions/php-7.0.6.tar.bz2
[Preparing]: /tmp/php-build/source/7.0.6
[Compiling]: /tmp/php-build/source/7.0.6
[xdebug]: Installing version 2.5.5
[xdebug]: Compiling xdebug in /tmp/php-build/source/xdebug-2.5.5
[xdebug]: Installing xdebug configuration in /home/vagrant/.anyenv/envs/phpenv/versions/7.0.6/etc/conf.d/xdebug.ini
[xdebug]: Cleaning up.
[Info]: Enabling Opcache...
[Info]: Done
[Info]: The Log File is not empty, but the Build did not fail. Maybe just warnings got logged. You can review the log in /tmp/php-build.7.0.6.20170804120859.log
[Success]: Built 7.0.6 successfully.
hdknr commented 6 years ago