Comments (4)
参考 https://github.com/swoole/phpy/blob/main/Dockerfile ,自己写
from phpy.
执行php -m查看未安装成功
`/www/phpy # docker-php-source extract && \
phpize && \ ./configure --with-python-config=/usr/bin/python3-config && \ make && make install && \ docker-php-ext-enable phpy && \ docker-php-source delete
Configuring for:
PHP Api Version: 20220829
Zend Module Api No: 20220829
Zend Extension Api No: 420220829
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20220829
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking dir of python... no
checking version of python... no
checking path of python_config... /usr/bin/python3-config
checking whether to enable phpy support... yes, shared
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -E
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
./configure: line 6372: /usr/bin/file: not found
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/
fetch https://mirrors.ustc.edu.cn/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://mirrors.ustc.edu.cn/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
(1/1) Installing .docker-php-ext-enable-deps (20240528.085413)
OK: 409 MiB in 119 packages
(1/1) Purging .docker-php-ext-enable-deps (20240528.085413)
OK: 409 MiB in 118 packages`
from phpy.
`/www/phpy # make test
/bin/sh /www/phpy/libtool --mode=install cp ./phpy.la /www/phpy/modules
cp ./.libs/phpy.so /www/phpy/modules/phpy.so
cp ./.libs/phpy.lai /www/phpy/modules/phpy.la
PATH="$PATH:/sbin" ldconfig -n /www/phpy/modules
Libraries have been installed in:
/www/phpy/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution - add LIBDIR to the `LD_RUN_PATH' environment variable
during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
Build complete.
Don't forget to run 'make test'.
=====================================================================
PHP : /usr/local/bin/php
Warning: PHP Startup: Unable to load dynamic library 'phpy.so' (tried: /www/phpy/modules/phpy.so (Error relocating /www/phpy/modules/phpy.so: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv: symbol not found), /www/phpy/modules/phpy.so.so (Error loading shared library /www/phpy/modules/phpy.so.so: No such file or directory)) in Unknown on line 0
PHP_SAPI : cli
PHP_VERSION : 8.2.15
ZEND_VERSION: 4.2.15
PHP_OS : Linux - Linux 883e4afeb547 5.4.265-1.el7.elrepo.x86_64 #1 SMP Wed Dec 20 13:57:20 EST 2023 x86_64
INI actual : /www/phpy/tmp-php.ini
More .INIs :
CWD : /www/phpy
Extra dirs :
VALGRIND : Not used
TIME START 2024-05-28 16:57:27
No tests were run.`
from phpy.
不知道是不是Linux的Alpine容器环境下,会出现这个情况,因为Alpine容器的安装方式都不一样,采用的是apk add,您这个是apt install
from phpy.
Related Issues (20)
- docker内的liunx的python安装方式,能来个详细点的教程吗 HOT 3
- py2php转换错误例子
- 加载phpy扩展失败 HOT 1
- python类继承,PHP怎么实现 HOT 2
- phpy错误的把python的空字典转换成了php的空数组 HOT 2
- 导入第三方包的时候出现错误 HOT 2
- alpine下存在php模块加载错误 HOT 2
- 编译成功了 但是python import报错 HOT 1
- 这种情况是什么原因? HOT 1
- PY 整数如何执行除法 HOT 6
- Python.h: No such file or directory HOT 1
- 请问支持conda的虚拟环境吗? HOT 1
- PHP-FPM中如何使用? HOT 2
- 参照Dockerfile,使用的是Alpine镜像容器,php -m列表没有显示成功 HOT 6
- PyList能否直接转化成php的数组 HOT 1
- Dockerfile.alpine执行构建镜像失败 HOT 1
- 我自己构建的phpy.so加载报错
- Python 对象内存泄露问题 HOT 2
- mac m1芯片是否支持安装?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpy.