Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArchLinux 上安装, libphpx.so 拷贝位置错误 #5

Closed
ipengxh opened this issue Jun 14, 2017 · 4 comments
Closed

ArchLinux 上安装, libphpx.so 拷贝位置错误 #5

ipengxh opened this issue Jun 14, 2017 · 4 comments
Labels

Comments

@ipengxh
Copy link

ipengxh commented Jun 14, 2017

在 ArchLinux 上执行:

bruce@Arch ~/s/PHP-X> sudo make install
[100%] Built target phpx
Install the project...
-- Install configuration: "Release"
Are you run command using root user?
-- Up-to-date: /usr/local/lib/libphpx.so
-- Up-to-date: /usr/local/include/phpx.h
-- Up-to-date: /usr/local/include/phpx_embed.h

拷贝的目标地址是 /usr/local/lib/libphpx.so
设置好 php.ini 后,执行 php -m,报警告信息:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/cpp_ext.so' - libphpx.so: cannot open shared object file: No such file or directory in Unknown on line 0

执行:

sudo cp /usr/local/lib/libphpx.so /usr/lib/

即可解决。

@matyhtf
Copy link
Member

matyhtf commented Jun 15, 2017

这不是一个好方案,建议将/usr/local/lib加入ld.conf配置中。

@hanlicun
Copy link

Starting php-fpm [15-Jun-2017 05:34:02] NOTICE: PHP message: PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libphpx.so' in Unknown on line 0


Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libphpx.so' in Unknown on line 0

done

@52fhy
Copy link

52fhy commented Aug 29, 2017

编译示例里的cpp_ext扩展简单流程:

1、编译PHP7
2、将PHP-X clone后放到PHP源码根目录 
3、先编译安装 php-x,会生成libphpx.so
4、再编译cpp_ext扩展,生成cpp_ext.so
5、`sudo cp /usr/local/lib/libphpx.so /usr/lib/`或者将`/usr/local/lib`加入ld.so.conf配置中,然后执行`ldconfig`更新/etc/ld.so.cache 文件。  

owenliang added a commit that referenced this issue Sep 13, 2017
@ghost
Copy link

ghost commented Nov 21, 2017

把libphpx.so拷贝到/usr/lib/ 下还是会报那个错额
用韩老大说的那种方式可行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants