gpt4 book ai didi

PHP编译: off_t undefined

转载 作者:可可西里 更新时间:2023-11-01 00:18:43 26 4
gpt4 key购买 nike

只是一个简单的问题:我想编译 PHP 7.1.6 并在执行配置脚本时遇到以下问题:

checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking size of off_t... 0
configure: error: off_t undefined; check your library configuration

这些是我的配置选项:

./configure --prefix=/usr/local/php --disable-all --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-pdo --with-pdo-mysql=/usr/local/mysql --with-zlib=/usr/local --with-zlib-dir=/usr/local --with-ldap=/usr/local --with-curl=/usr/local --with-openssl=/usr/local/ssl --with-libxml-dir=/usr/local --with-iconv=/usr/local --with-iconv-dir=/usr/local --with-pcre-regex=/usr/local --with-pcre-dir=/usr/local --enable-filter --disable-debug --enable-inline-optimization --disable-rpath --disable-static --enable-session --enable-dom --enable-json --enable-ctype --enable-hash --enable-tokenizer --enable-xmlreader --enable-shared --enable-xml --enable-libxml --enable-simplexml --with-pic --enable-bcmath --with-gd --with-freetype-dir=/usr/local --with-png-dir=/usr/local --with-jpeg-dir=/usr/local --enable-gd-native-ttf --enable-mbstring --enable-zip --enable-intl --enable-soap --enable-exif

也许你们有人能给我一些提示?

最佳答案

libzip 版本与 php 版本不兼容。编译php7.3时使用最新版的libzip会出现这个问题,降级就可以了。

wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install

可能还有一个问题:zipconf.h: 没有那个文件或目录 https://github.com/Homebrew/legacy-homebrew/issues/13390

cp php-7.3.0/ext/zip/lib/zipconf.h /usr/local/include/ 

关于PHP编译: off_t undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44941513/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com