php 7.4.x ソース構築時、libzipのエラー

php 7.4.x ソース構築時、libzipのエラーで手間取ったので、そのエラーの覚え書きを・・・

php configure

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pdo-mysql --with-mysqli --enable-pcntl --enable-mbstring --enable-ftp --enable-gd-jis-conv --enable-cgi --with-curl --enable-opcache --with-openssl --enable-intl --with-gettext --enable-gd --with-jpeg --with-webp --with-xpm --with-freetype --enable-gd-jis-conv --with-zlib

checking for libzip >= 0.11... no
configure: error: Package requirements (libzip >= 0.11) were not met:

Requested 'libzip >= 0.11' but version of libzip is 0.10.1

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBZIP_CFLAGS
and LIBZIP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.



# yum install libzip libzip-devel

↑yum でインストールをしたが
# yum info libzip-devel
Name : libzip-devel
Arch : i686
Version : 0.10.1


libzip ソースインストール

yum ではなく、ソースからインストールをする。

# yum install cmake


↓2020/08/19 追記

checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... no
configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:

と、「libzip」の「1.7.0」は、ダメと言われるので、libzip-1.7.3を入れて、configureをかけますが、エラーが出ます。(php 7.4.9にて)
# export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/libzip/lib64/pkgconfig"


# wget
# tar xzvf libzip-1.7.3.tar.gz 
# cd libzip-1.7.3
# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/libzip
CMake Error at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  CMake 3.0.2 or higher is required.  You are running version

-- Configuring incomplete, errors occurred!

(2020/08/19 修正)
# yum install cmake3

# cmake3 -DCMAKE_INSTALL_PREFIX=/usr/local/libzip

# make
# make install


php 再度、configure

# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pdo-mysql --with-mysqli --enable-pcntl --enable-mbstring --enable-ftp --enable-gd-jis-conv --enable-cgi --with-curl --enable-opcache --with-openssl --enable-intl --with-gettext --enable-gd --with-jpeg --with-webp --with-xpm --with-freetype --enable-gd-jis-conv

(「 –with-zlib-dir=/usr/local/libzip」の指定は、省きました。2020/08/19)
# make
# make install