{"id":27,"date":"2024-09-19T17:12:11","date_gmt":"2024-09-19T09:12:11","guid":{"rendered":"http:\/\/log.d9t3.com\/?p=27"},"modified":"2024-09-19T17:12:11","modified_gmt":"2024-09-19T09:12:11","slug":"%e5%be%ae%e4%bf%a1%e6%94%af%e4%bb%98%e5%b9%b3%e5%8f%b0%e8%af%81%e4%b9%a6-php5-6-%e6%89%a9%e5%b1%95-libsodium-sodium","status":"publish","type":"post","link":"https:\/\/log.d9t3.com\/?p=27","title":{"rendered":"\u5fae\u4fe1\u652f\u4ed8\u5e73\u53f0\u8bc1\u4e66 PHP5.6 \u6269\u5c55 libsodium sodium"},"content":{"rendered":"\n<p>php5.6 linux\u7248\u672c<br>\u7248\u672c\uff1a1.0.6<\/p>\n\n\n\n<p>wget https:\/\/github.com\/jedisct1\/libsodium-php\/archive\/1.0.6.tar.gz<\/p>\n\n\n\n<p>\u5177\u4f53\u547d\u4ee4<br>wget https:\/\/github.com\/jedisct1\/libsodium-php\/archive\/1.0.6.tar.gz<br>tar xf 1.0.6.tar.gz<br>cd tar xf 1.0.6<br>\/www\/server\/php\/56\/bin\/phpize<br>.\/configure &#8211;with-php-config=\/www\/server\/php\/56\/bin\/php-config<br>make<br>make install<br>\u914d\u7f6ephp.ini<br>extension=libsodium.so<\/p>\n\n\n\n<p>\u6587\u4ef6\u4f4d\u7f6e<\/p>\n\n\n\n<p>\/www\/server\/php\/56\/etc<\/p>\n\n\n\n<p>libsodium<br>libsodium support enabled<br>libsodium compiled version 1.0.6<br>libsodium headers version 1.0.18<br>libsodium library version 1.0.18<br>\u5b89\u88c5\u548c\u7f16\u8bd1\u8fc7\u7a0b<br>1.0.6.tar.gz 2.0.22.tar.gz libsodium-php-1.0.6 libsodium-php-2.0.22<br>[root@iZwz90913tx5u1k5xdokjgZ php56]# cd libsodium-php-1.0.6<br>[root@iZwz90913tx5u1k5xdokjgZ libsodium-php-1.0.6]# \/www\/server\/php\/56\/bin\/phpize<br>Configuring for:<br>PHP Api Version: 20131106<br>Zend Module Api No: 20131226<br>Zend Extension Api No: 220131226<br>[root@iZwz90913tx5u1k5xdokjgZ libsodium-php-1.0.6]# .\/configure &#8211;with-php-config=\/www\/server\/php\/56\/bin\/php-config<br>checking for grep that handles long lines and -e\u2026 \/usr\/bin\/grep<br>checking for egrep\u2026 \/usr\/bin\/grep -E<br>checking for a sed that does not truncate output\u2026 \/usr\/bin\/sed<br>checking for cc\u2026 cc<br>checking whether the C compiler works\u2026 yes<br>checking for C compiler default output file name\u2026 a.out<br>checking for suffix of executables\u2026<br>checking whether we are cross compiling\u2026 no<br>checking for suffix of object files\u2026 o<br>checking whether we are using the GNU C compiler\u2026 yes<br>checking whether cc accepts -g\u2026 yes<br>checking for cc option to accept ISO C89\u2026 none needed<br>checking how to run the C preprocessor\u2026 cc -E<br>checking for icc\u2026 no<br>checking for suncc\u2026 no<br>checking whether cc understands -c and -o together\u2026 yes<br>checking for system library directory\u2026 lib<br>checking if compiler supports -R\u2026 no<br>checking if compiler supports -Wl,-rpath,\u2026 yes<br>checking build system type\u2026 x86_64-unknown-linux-gnu<br>checking host system type\u2026 x86_64-unknown-linux-gnu<br>checking target system type\u2026 x86_64-unknown-linux-gnu<br>checking for PHP prefix\u2026 \/www\/server\/php\/56<br>checking for PHP includes\u2026 -I\/www\/server\/php\/56\/include\/php -I\/www\/server\/php\/56\/include\/php\/main -I\/www\/server\/php\/56\/include\/php\/TSRM -I\/www\/server\/php\/56\/include\/php\/Zend -I\/www\/server\/php\/56\/include\/php\/ext -I\/www\/server\/php\/56\/include\/php\/ext\/date\/lib<br>checking for PHP extension directory\u2026 \/www\/server\/php\/56\/lib\/php\/extensions\/no-debug-non-zts-20131226<br>checking for PHP installed headers prefix\u2026 \/www\/server\/php\/56\/include\/php<br>checking if debug is enabled\u2026 no<br>checking if zts is enabled\u2026 no<br>checking for re2c\u2026 no<br>configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.<br>checking for gawk\u2026 gawk<br>checking for libsodium support\u2026 yes, shared<br>checking for libsodium files in default path\u2026 found in \/usr<br>checking for crypto_pwhash_scryptsalsa208sha256 in -lsodium\u2026 yes<br>checking for crypto_aead_aes256gcm_encrypt in -lsodium\u2026 yes<br>checking for ld used by cc\u2026 \/usr\/bin\/ld<br>checking if the linker (\/usr\/bin\/ld) is GNU ld\u2026 yes<br>checking for \/usr\/bin\/ld option to reload object files\u2026 -r<br>checking for BSD-compatible nm\u2026 \/usr\/bin\/nm -B<br>checking whether ln -s works\u2026 yes<br>checking how to recognize dependent libraries\u2026 pass_all<br>checking for ANSI C header files\u2026 yes<br>checking for sys\/types.h\u2026 yes<br>checking for sys\/stat.h\u2026 yes<br>checking for stdlib.h\u2026 yes<br>checking for string.h\u2026 yes<br>checking for memory.h\u2026 yes<br>checking for strings.h\u2026 yes<br>checking for inttypes.h\u2026 yes<br>checking for stdint.h\u2026 yes<br>checking for unistd.h\u2026 yes<br>checking dlfcn.h usability\u2026 yes<br>checking dlfcn.h presence\u2026 yes<br>checking for dlfcn.h\u2026 yes<br>checking the maximum length of command line arguments\u2026 1572864<br>checking command to parse \/usr\/bin\/nm -B output from cc object\u2026 ok<br>checking for objdir\u2026 .libs<br>checking for ar\u2026 ar<br>checking for ranlib\u2026 ranlib<br>checking for strip\u2026 strip<br>checking if cc supports -fno-rtti -fno-exceptions\u2026 no<br>checking for cc option to produce PIC\u2026 -fPIC<br>checking if cc PIC flag -fPIC works\u2026 yes<br>checking if cc static flag -static works\u2026 no<br>checking if cc supports -c -o file.o\u2026 yes<br>checking whether the cc linker (\/usr\/bin\/ld -m elf_x86_64) supports shared libraries\u2026 yes<br>checking whether -lc should be explicitly linked in\u2026 no<br>checking dynamic linker characteristics\u2026 GNU\/Linux ld.so<br>checking how to hardcode library paths into programs\u2026 immediate<br>checking whether stripping libraries is possible\u2026 yes<br>checking if libtool supports shared libraries\u2026 yes<br>checking whether to build shared libraries\u2026 yes<br>checking whether to build static libraries\u2026 no<\/p>\n\n\n\n<p>creating libtool<br>appending configuration tag &#8220;CXX&#8221; to libtool<br>configure: creating .\/config.status<br>config.status: creating config.h<br>[root@iZwz90913tx5u1k5xdokjgZ libsodium-php-1.0.6]# make<br>\/bin\/sh \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/libtool &#8211;mode=compile cc -I. -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6 -DPHP_ATOM_INC -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/include -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/main -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6 -I\/www\/server\/php\/56\/include\/php -I\/www\/server\/php\/56\/include\/php\/main -I\/www\/server\/php\/56\/include\/php\/TSRM -I\/www\/server\/php\/56\/include\/php\/Zend -I\/www\/server\/php\/56\/include\/php\/ext -I\/www\/server\/php\/56\/include\/php\/ext\/date\/lib -DHAVE_CONFIG_H -g -O2 -c \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/libsodium.c -o libsodium.lo<br>mkdir .libs<br>cc -I. -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6 -DPHP_ATOM_INC -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/include -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/main -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6 -I\/www\/server\/php\/56\/include\/php -I\/www\/server\/php\/56\/include\/php\/main -I\/www\/server\/php\/56\/include\/php\/TSRM -I\/www\/server\/php\/56\/include\/php\/Zend -I\/www\/server\/php\/56\/include\/php\/ext -I\/www\/server\/php\/56\/include\/php\/ext\/date\/lib -DHAVE_CONFIG_H -g -O2 -c \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/libsodium.c -fPIC -DPIC -o .libs\/libsodium.o<br>\/bin\/sh \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/libtool &#8211;mode=link cc -DPHP_ATOM_INC -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/include -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/main -I\/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6 -I\/www\/server\/php\/56\/include\/php -I\/www\/server\/php\/56\/include\/php\/main -I\/www\/server\/php\/56\/include\/php\/TSRM -I\/www\/server\/php\/56\/include\/php\/Zend -I\/www\/server\/php\/56\/include\/php\/ext -I\/www\/server\/php\/56\/include\/php\/ext\/date\/lib -DHAVE_CONFIG_H -g -O2 -o libsodium.la -export-dynamic -avoid-version -prefer-pic -module -rpath \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/modules libsodium.lo -lsodium<br>cc -shared .libs\/libsodium.o -lsodium -Wl,-soname -Wl,libsodium.so -o .libs\/libsodium.so<br>creating libsodium.la<br>(cd .libs &amp;&amp; rm -f libsodium.la &amp;&amp; ln -s ..\/libsodium.la libsodium.la)<br>\/bin\/sh \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/libtool &#8211;mode=install cp .\/libsodium.la \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/modules<br>cp .\/.libs\/libsodium.so \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/modules\/libsodium.so<br>cp .\/.libs\/libsodium.lai \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/modules\/libsodium.la<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PATH=&#8221;$PATH:\/sbin&#8221; ldconfig -n \/\u672a\u6765\u4e4b\u7a97\u963f\u96ea\u6280\u672f\u89c2\/php56\/libsodium-php-1.0.6\/modules<\/h2>\n\n\n\n<p>Libraries have been installed in:<br>\/php56\/libsodium-php-1.0.6\/modules<\/p>\n\n\n\n<p>If you ever happen to want to link against installed libraries<br>in a given directory, LIBDIR, you must either use libtool, and<br>specify the full pathname of the library, or use the `-LLIBDIR&#8217;<br>flag during linking and do at least one of the following:<\/p>\n\n\n\n<ul>\n<li>add LIBDIR to the `LD_LIBRARY_PATH&#8217; environment variable<br>during execution<\/li>\n\n\n\n<li>add LIBDIR to the `LD_RUN_PATH&#8217; environment variable<br>during linking<\/li>\n\n\n\n<li>use the `-Wl,&#8211;rpath -Wl,LIBDIR&#8217; linker flag<\/li>\n\n\n\n<li>have your system administrator add LIBDIR to `\/etc\/ld.so.conf&#8217;<br>See any operating system documentation about shared libraries for<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">more information, such as the ld(1) and ld.so(8) manual pages.<\/h2>\n\n\n\n<p>Build complete.<br>Don&#8217;t forget to run &#8216;make test&#8217;.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>php5.6 linux\u7248\u672c\u7248\u672c\uff1a1.0.6 wget https:\/\/github.com\/jedisct1<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"https:\/\/log.d9t3.com\/?p=27\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":1,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/log.d9t3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/log.d9t3.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}