configure:error:utf8_mime2text()有新签名,但缺少U8T_CANONICAL

dvl*_*den 32 php macos

今天我想在MacOS Mountain Lion上升级php.我按照MacTuts +教程和我执行该长命令的步骤:

./configure  \
--prefix=/usr  \
--mandir=/usr/share/man  \
--infodir=/usr/share/info  \
--sysconfdir=/private/etc  \
--with-apxs2=/usr/sbin/apxs  \
--enable-cli  \
--with-config-file-path=/etc  \
--with-libxml-dir=/usr  \
--with-openssl=/usr  \
--with-kerberos=/usr  \
--with-zlib=/usr  \
--enable-bcmath  \
--with-bz2=/usr  \
--enable-calendar  \
--with-curl=/usr  \
--enable-dba  \
--enable-exif  \
--enable-ftp  \
--with-gd  \
--enable-gd-native-ttf  \
--with-icu-dir=/usr  \
--with-iodbc=/usr  \
--with-ldap=/usr  \
--with-ldap-sasl=/usr  \
--with-libedit=/usr  \
--enable-mbstring  \
--enable-mbregex  \
--with-mysql=mysqlnd  \
--with-mysqli=mysqlnd  \
--without-pear  \
--with-pdo-mysql=mysqlnd  \
--with-mysql-sock=/var/mysql/mysql.sock  \
--with-readline=/usr  \
--enable-shmop  \
--with-snmp=/usr  \
--enable-soap  \
--enable-sockets  \
--enable-sysvmsg  \
--enable-sysvsem  \
--enable-sysvshm  \
--with-tidy  \
--enable-wddx  \
--with-xmlrpc  \
--with-iconv-dir=/usr  \
--with-xsl=/usr  \
--enable-zip  \
--with-imap=/usr/local/imap-2007 \
--with-kerberos \
--with-imap-ssl \
--enable-intl \
--with-pcre-regex  \
--with-pgsql=/usr  \
--with-pdo-pgsql=/usr \
--with-freetype-dir=/usr/X11 \
--with-jpeg-dir=/usr  \
--with-png-dir=/usr/X11
Run Code Online (Sandbox Code Playgroud)

我在流程结束时收到错误.

configure:error:utf8_mime2text()有新签名,但缺少U8T_CANONICAL.这不应该发生.检查config.log以获取其他信息.

有解决方案吗 提前致谢.

Ais*_*tis 64

对于在docker上有相同错误的人:

RUN apt-get update && apt-get install -y libc-client-dev libkrb5-dev && rm -r /var/lib/apt/lists/*
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
    && docker-php-ext-install imap
Run Code Online (Sandbox Code Playgroud)

  • 我确认这适用于docker php image.谢谢! (3认同)
  • 码头工人的完美解决方案,虽然我最初错过了`rm`.这搞砸了我的`Dockerfile`中的其他apt-get语句:) (2认同)

ker*_*vin 16

如果您的操作系统存储库中有"libc-client-devel"RPM或其他软件包,请安装它.

这将提供PHP为IMAP支持所需的c-client库和头文件.

  • 在Debian的情况下,它将是`apt-get install libc-client2007e-dev` (17认同)

小智 10

可以通过删除IMAP支持,删除这些行来修复错误

--with-imap=/usr/local/imap-2007
--with-imap-ssl
Run Code Online (Sandbox Code Playgroud)

  • 仅仅安装所需的库,而不是删除导致问题的服务,这不是一个更好的解决方案吗?根据下面_kervin_的评论,在RedHat上安装`libc-client-devel`,或者在Ubuntu/Debian上安装`libc-client2007e-dev`,一切都应该没问题. (9认同)

小智 8

Docker 和 PHP 与 Apache(php:apache 默认映像)可以配合使用:

RUN apt-get update && apt-get install libc-client-dev libkrb5-dev && \
    docker-php-ext-configure imap --with-kerberos --with-imap-ssl && apt-get clean
Run Code Online (Sandbox Code Playgroud)

根据安装情况,可能还需要其他依赖项。


小智 6

旧线程永远不会死......

我在OSX Yosemite 10.10.5上,已经安装了我自己的php,目前是5.6.1,并希望升级到5.6.13 - 遇到了与imap相同的错误.

看到这个线程,然后运行brew install map-uw然后configure根据我现有的phpinfo输出运行.

./configure \
--prefix=/usr/local/php5 \
--with-apxs2=/usr/sbin/apxs \
--with-config-file-scan-dir=/usr/local/php5/php.d \
--with-openssl=/usr \
--with-zlib=/usr \
--with-zlib-dir=/usr \
--with-gd \
--with-ldap \
--with-xmlrpc \
--enable-exif \
--enable-soap \
--enable-wddx \
--enable-ftp \
--enable-sockets \
--with-bz2=/usr \
--enable-zip \
--enable-shmop \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-mbstring \
--enable-bcmath \
--enable-calendar \
--with-mhash \
--enable-fpm \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--enable-pcntl \
--enable-dtrace \
--enable-opcache \
--disable-phpdbg \
--with-icu-dir=/usr/local/php5 \
--with-mssql=shared,/usr/local/php5 \
--with-pdo-dblib=shared,/usr/local/php5 \
--with-libxml-dir=shared,/usr/local/php5 \
--with-xsl=shared,/usr/local/php5 \
--with-imap=shared,/usr/local/Cellar/imap-uw/2007f \
--with-kerberos=/usr \
--with-imap-ssl=/usr \
--with-gettext=/usr/local/php5 \
--with-curl=shared,/usr/local/php5 \
--with-png-dir=/usr/local/php5 \
--with-jpeg-dir=/usr/local/php5 \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/local/php5 \
--with-pgsql=shared,/usr/local/php5 \
--with-pdo-pgsql=shared,/usr/local/php5 \
--with-mcrypt=shared,/usr/local/php5 \
--with-tidy=/usr/local/php5 \
--with-gmp=shared,/usr/local/php5 \
--with-readline=shared,/usr/local/php5
Run Code Online (Sandbox Code Playgroud)

然后make.它似乎工作正常.


Oct*_*pus 5

当我尝试编译 PHP 5.5.0 时,我在 Fedora 上也遇到了同样的问题。

该问题与配置参数有关'--with-imap'

为了解决这个问题,我从最新的源代码(当前是 imap-2007f)编译了我自己的 imap 版本,为此我必须安装一些先决条件。在 Fedora 上我做了这个......

yum install openssl openssl-devel pam-devel
wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
tar zxvf imap-2007f.tar.gz
Run Code Online (Sandbox Code Playgroud)

然后我必须创建一个软链接,以便编译器可以找到这些库。就我而言,我执行了以下操作:

mkdir /usr/local/ssl
ln -s /usr/include /usr/local/ssl/include
Run Code Online (Sandbox Code Playgroud)

然后编译:

cd imap-2007f
make lnp SSLTYPE=unix EXTRACFLAGS=-fPIC
Run Code Online (Sandbox Code Playgroud)

然后我可以通过将 imap 源路径添加到配置参数来编译 PHP,如下所示:

/path/to/php/src> ./configure ...other_params... '--with-imap=/path/to/imap-2007f' '--with-imap-ssl' 
make
make install
Run Code Online (Sandbox Code Playgroud)


Mat*_*Mat 5

我已经安装了以下软件包并且可以正常工作:
uw-imap-devel

在 CentOS 7.x 上运行此命令:
yum -y install uw-imap-devel