在 OSX 上安装 uuid pecl 扩展时失败

发布于 2024-11-08 14:58:13 字数 2874 浏览 0 评论 0原文

因此,不熟悉这里安装扩展是我的过程和失败的时刻。

$ sudo pecl install uuid

那么一切都很好,直到...

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/uuid-1.0.2/libtool --mode=compile cc  -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include  -DHAVE_CONFIG_H  -g -O2   -c /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c -o uuid.lo
mkdir .libs
 cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include -DHAVE_CONFIG_H -g -O2 -c "/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c"  -fno-common -DPIC -o .libs/uuid.o
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zm_startup_uuid’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: (Each undeclared identifier is reported only once
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: for each function it appears in.)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:90: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zif_uuid_create’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:168: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:171: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:181: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
make: *** [uuid.lo] Error 1
ERROR: `make' failed

So not to familiar with installing extensions by here is my process and the moment of fail.

$ sudo pecl install uuid

then all is good until...

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/uuid-1.0.2/libtool --mode=compile cc  -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include  -DHAVE_CONFIG_H  -g -O2   -c /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c -o uuid.lo
mkdir .libs
 cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/include -DHAVE_CONFIG_H -g -O2 -c "/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c"  -fno-common -DPIC -o .libs/uuid.o
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zm_startup_uuid’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: (Each undeclared identifier is reported only once
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: for each function it appears in.)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:90: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zif_uuid_create’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:168: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:171: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:181: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
make: *** [uuid.lo] Error 1
ERROR: `make' failed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绝影如岚 2024-11-15 14:58:13

按照本教程操作 -

http://unrealexpectations .com/blog/2010/04/mamp-pecluuid-module-working-on-snow-leopard/

当您进行修补程序时,请确保正确输入要修补的文件,您希望它是test/uuid_mac.phpt

如果这不起作用,请确保您的 php.ini 配置了 extension_dir 并在那里也配置了 extension=uuid.so 。

这也适用于 OS X 10.7

Follow this tutorial --

http://unrealexpectations.com/blog/2010/04/mamp-pecluuid-module-working-on-snow-leopard/

When you go to make the patch make sure the file to patch are entered correctly, you want to have it be tests/uuid_mac.phpt

If that doesn't work make sure you have you have your php.ini configured with the extension_dir and have the extension=uuid.so there as well.

This also works for OS X 10.7

甜嗑 2024-11-15 14:58:13

您将需要来自 util-linux 的更新版本的 uuid。它可以在 Homebrew 上使用。

brew install util-linux

util-linux 是一个仅 keg 的软件包,不会符号链接到 /usr/local。因此,当提示输入 uuid 安装目录时,您必须指定以下路径

/usr/local/opt/util-linux

对于无人值守安装,您可以使用

printf "/usr/local/opt/util-linux" | pecl install uuid

You will need an updated version of uuid from util-linux. It is available on Homebrew.

brew install util-linux

But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory

/usr/local/opt/util-linux

For unattended installations, you can use

printf "/usr/local/opt/util-linux" | pecl install uuid
泪是无色的血 2024-11-15 14:58:13

手动编译时(https://www.php.net/manual/ en/install.pecl.phpize.php)你可以brew install util-linux并使用这个:

./configure --with-uuid=/opt/homebrew/Cellar/util-linux/2.39.3

但是编译PHP后抱怨它不是一个有效的扩展,所以... _(ツ)_/¯

When compiling manually (https://www.php.net/manual/en/install.pecl.phpize.php) you can brew install util-linux and use this:

./configure --with-uuid=/opt/homebrew/Cellar/util-linux/2.39.3

However after compiling PHP complained that it's not a valid extension, so... ¯\_(ツ)_/¯

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文