php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61488 Installation successful but unable to load , i don't know why
Submitted: 2012-03-23 08:51 UTC Modified: 2017-04-01 21:32 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jianwangok at 163 dot com Assigned:
Status: Wont fix Package: python (PECL)
PHP Version: 5.4.0 OS: CentOS
Private report: No CVE-ID: None
 [2012-03-23 08:51 UTC] jianwangok at 163 dot com
Description:
------------
I have tried with php 5.2.9 and PHP 5.4.0
1. my Installation log:

[root@nagios-cacti docs]# /usr/local/php5/bin/pecl install python-0.8.0
downloading python-0.8.0.tgz ...
Starting to download python-0.8.0.tgz (19,822 bytes)
.......done: 19,822 bytes
10 source files, building
WARNING: php_bin /usr/local/php5/bin/php appears to have a suffix 5/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0
running: /tmp/pear/temp/python/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/local/php5
checking for PHP includes... -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /usr/local/php5/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for embedded Python support... yes, shared
checking for Python files in default path... found in /usr/local
checking for dlopen in -ldl... yes
checking for Py_Initialize in -lpython2.5... yes
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/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 recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/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
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/python/python.c -o python.lo
mkdir .libs
 gcc -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5 -I/usr/local/php5/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/python/python.c  -fPIC -DPIC -o .libs/python.o
/tmp/pear/temp/python/python.c: In function 'zif_python_version':
/tmp/pear/temp/python/python.c:222: warning: initialization discards qualifiers from pointer target type
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/python/python_convert.c -o python_convert.lo
 gcc -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5 -I/usr/local/php5/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/python/python_convert.c  -fPIC -DPIC -o .libs/python_convert.o
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/python/python_handlers.c -o python_handlers.lo
 gcc -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5 -I/usr/local/php5/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/python/python_handlers.c  -fPIC -DPIC -o .libs/python_handlers.o
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/python/python_object.c -o python_object.lo
 gcc -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5 -I/usr/local/php5/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/python/python_object.c  -fPIC -DPIC -o .libs/python_object.o
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=compile gcc  -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/python/python_php.c -o python_php.lo
 gcc -I. -I/tmp/pear/temp/python -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5 -I/usr/local/php5/include/php -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/python/python_php.c  -fPIC -DPIC -o .libs/python_php.o
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=link gcc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/include -I/tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/main -I/tmp/pear/temp/python -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -I/usr/local/include/python2.5  -I/usr/local/php5/include/php -DHAVE_CONFIG_H  -g -O2   -o python.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/modules  python.lo python_convert.lo python_handlers.lo python_object.lo python_php.lo -Wl,-rpath,/usr/local/lib/python2.5/config -L/usr/local/lib/python2.5/config -lpython2.5
gcc -shared  .libs/python.o .libs/python_convert.o .libs/python_handlers.o .libs/python_object.o .libs/python_php.o  -L/usr/local/lib/python2.5/config -lpython2.5  -Wl,-rpath -Wl,/usr/local/lib/python2.5/config -Wl,-soname -Wl,python.so -o .libs/python.so
creating python.la
(cd .libs && rm -f python.la && ln -s ../python.la python.la)
/bin/sh /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/libtool --mode=install cp ./python.la /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/modules
cp ./.libs/python.so /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/modules/python.so
cp ./.libs/python.lai /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/modules/python.la
PATH="$PATH:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear/temp/pear-build-rootVjOBtW/python-0.8.0/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
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

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'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/
running: find "/tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0" | xargs ls -dils
4354564    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0
4354594    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr
4354595    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local
4354596    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5
4354597    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib
4354598    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib/php
4354599    4 drwxr-xr-x 3 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib/php/extensions
4354600    4 drwxr-xr-x 2 root root    4096 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
4354593 3920 -rwxr-xr-x 1 root root 4009609 Mar 23 16:31 /tmp/pear/temp/pear-build-rootVjOBtW/install-python-0.8.0/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so

Build process completed successfully
Installing '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so'
install ok: channel://pecl.php.net/python-0.8.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=python.so" to php.ini

2. then:
i add "extension=python.so" to php.ini
and set extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613"

3. in the end, i execute "php --ini" but it was error:
[root@nagios-cacti docs]# /usr/local/php5/bin/php --ini
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so' - /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so: undefined symbol: forkpty in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/php5/etc
Loaded Configuration File:         /usr/local/php5/etc/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

[root@nagios-cacti docs]# ll /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so
-rw-r--r-- 1 root root 4009609 Mar 23 16:31 /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so

[root@nagios-cacti docs]# /usr/local/php5/bin/php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so' - /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/python.so: undefined symbol: forkpty in Unknown on line 0
PHP 5.2.9 (cli) (built: Mar 21 2012 03:39:54)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


please tell why,thank you very mush!
my email address: jianwangok@163.com





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-07 06:45 UTC] lahiruhd at gmail dot com
Hi,
I installed gearman in ubuntu 10.10 using the following command;
apt-get install gearman-job-server

Then checked the installation using the following command and got success result.
gearmand -vvv

In my program I have to use Python, so I installed python gearman client using following command;
easy_install gearman
also installed and checked with;
pip install gearman  
Both are installed successfully 

But when I going to import GearmanClient in python, it gives an error saying cannot import name GearmanClient

IDE : Eclipse

Code :

import time
from gearman import GearmanClient, Task

client = GearmanClient(["127.0.0.1"])

for i in range(5):
    client.dispatch_background_task('speak', i)
    print 'Dispatched %d' % i
    time.sleep(1)


Result error :

from gearman import GearmanClient, Task
ImportError: cannot import name GearmanClient
ERROR: Module: producer could not be imported (file: /home/lahiru/workspace/GearMan-Test/producer.py).


Thanks in advanced for any help.
 [2017-04-01 21:32 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 21:32 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2008, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC