PHP PDO インストール

投稿者:

Linuxの場合は一発でうまくいく。
Windowsの場合はエラーがでてできないっぽい。 調査中です
[root@localhost root]# pecl install pdo
downloading PDO-1.0.3.tgz …
Starting to download PDO-1.0.3.tgz (52,613 bytes)
………….done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
building in /var/tmp/pear-build-root/PDO-1.0.3
running: /tmp/tmpFBlmMq/PDO-1.0.3/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… 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 whether gcc and cc understand -c and -o together… yes
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
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
checking for PHP extension directory… /usr/local/lib/php/extensions/no-debug-non-zts-20050922
checking for PHP installed headers prefix… /usr/local/include/php
checking for re2c… no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk… gawk
checking whether to enable PDO support… yes, shared
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 how to run the C preprocessor… gcc -E
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 for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking how to run the C++ preprocessor… g++ -E
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… yes
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
checking for ld used by g++… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking whether the g++ linker (/usr/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++ supports -c -o file.o… yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=compile gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo.c -o pdo.lo
mkdir .libs
gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo.c -fPIC -DPIC -o .libs/pdo.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=compile gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_dbh.c -o pdo_dbh.lo
gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_dbh.c -fPIC -DPIC -o .libs/pdo_dbh.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=compile gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_stmt.c -o pdo_stmt.lo
gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_stmt.c -fPIC -DPIC -o .libs/pdo_stmt.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=compile gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_sql_parser.c -o pdo_sql_parser.lo
gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_sql_parser.c -fPIC -DPIC -o .libs/pdo_sql_parser.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=compile gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_sqlstate.c -o pdo_sqlstate.lo
gcc -I. -I/tmp/tmpFBlmMq/PDO-1.0.3 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpFBlmMq/PDO-1.0.3/pdo_sqlstate.c -fPIC -DPIC -o .libs/pdo_sqlstate.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=link gcc -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/tmpFBlmMq/PDO-1.0.3 -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 -DHAVE_CONFIG_H -g -O2 -o pdo.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/tmp/pear-build-root/PDO-1.0.3/modules pdo.lo pdo_dbh.lo pdo_stmt.lo pdo_sql_parser.lo pdo_sqlstate.lo
gcc -shared .libs/pdo.o .libs/pdo_dbh.o .libs/pdo_stmt.o .libs/pdo_sql_parser.o .libs/pdo_sqlstate.o -Wl,-soname -Wl,pdo.so -o .libs/pdo.so
creating pdo.la
(cd .libs && rm -f pdo.la && ln -s ../pdo.la pdo.la)
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool –mode=install cp ./pdo.la /var/tmp/pear-build-root/PDO-1.0.3/modules
cp ./.libs/pdo.so /var/tmp/pear-build-root/PDO-1.0.3/modules/pdo.so
cp ./.libs/pdo.lai /var/tmp/pear-build-root/PDO-1.0.3/modules/pdo.la
PATH=”$PATH:/sbin” ldconfig -n /var/tmp/pear-build-root/PDO-1.0.3/modules
———————————————————————-
Libraries have been installed in:
/var/tmp/pear-build-root/PDO-1.0.3/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.
(It is safe to ignore warnings about tempnam and tmpnam).
running: make INSTALL_ROOT=”/var/tmp/pear-build-root/install-PDO-1.0.3″ install
Installing shared extensions: /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20050922/
Installing header files: /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/
Installing PDO headers: /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/ext/pdo/
running: find “/var/tmp/pear-build-root/install-PDO-1.0.3” -ls
6782989 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3
16393 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr
49161 4 drwxr-xr-x 4 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local
147465 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib
163854 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib/php
196622 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib/php/extensions
294926 4 drwxr-xr-x 2 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20050922
294927 312 -rwxr-xr-x 1 root root 312033 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/lib/php/extensions/no-debug-non-zts-20050922/pdo.so
344078 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include
442377 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php
458766 4 drwxr-xr-x 3 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/ext
475150 4 drwxr-xr-x 2 root root 4096 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/ext/pdo
475153 4 -rw-r–r– 1 root root 3016 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/ext/pdo/php_pdo.h
475151 24 -rw-r–r– 1 root root 23679 11月 2 11:16 /var/tmp/pear-build-root/install-PDO-1.0.3/usr/local/include/php/ext/pdo/php_pdo_driver.h
Build process completed successfully
Installing ‘/var/tmp/pear-build-root/install-PDO-1.0.3//usr/local/lib/php/extensions/no-debug-non-zts-20050922/pdo.so’
Installing ‘/var/tmp/pear-build-root/install-PDO-1.0.3//usr/local/include/php/ext/pdo/php_pdo.h’
Installing ‘/var/tmp/pear-build-root/install-PDO-1.0.3//usr/local/include/php/ext/pdo/php_pdo_driver.h’
install ok: channel://pecl.php.net/PDO-1.0.3
You should add “extension=pdo.so” to php.ini

Thank you for reading this post, don't forget to subscribe!