我想打包一個含這些擴展的靜態(tài)php http://m.wtbis.cn/download
這里的沒有mongodb和imagick
bin/spc build --build-cli "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,filter,fileinfo,gd,iconv,intl,mbstring,mbregex,mysqli,mysqlnd,openssl,opcache,pcntl,pdo,pdo_mysql,pdo_sqlite,pdo_pgsql,pgsql,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib,mongodb,imagick"
按照 https://github.com/crazywhalecc/static-php-cli 的步驟
執(zhí)行編譯命令 的時候提示
[11:05:24] [CRIT] Build failed with SPC\exception\RuntimeException: Command run failed with code[2]: cd '/www/static-php/static-php-cli/source/openssl' && CFLAGS='' CC='x86_64-linux-musl-gcc -static -idirafter /www/static-php/static-php-cli/buildroot/include -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ ' ./Configure no-shared zlib --prefix=/ --libdir=lib -static --with-zlib-include=/www/static-php/static-php-cli/buildroot/include --with-zlib-lib=/www/static-php/static-php-cli/buildroot/lib no-legacy linux-x86_64 1>/dev/null 2>&1
[11:05:24] [CRIT] Please check with --debug option to see more details.
加--debug 顯示這個 AI 提示要安裝 sudo yum install openssl-devel 也已經(jīng)安裝了, 還是一樣的錯誤
[DEBU] Running command with direct output: cd '/www/static-php/static-php-cli/source/openssl' && CFLAGS='' CC='x86_64-linux-musl-gcc -static -idirafter /www/static-php/static-php-cli/buildroot/include -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ ' ./Configure no-shared zlib --prefix=/ --libdir=lib -static --with-zlib-include=/www/static-php/static-php-cli/buildroot/include --with-zlib-lib=/www/static-php/static-php-cli/buildroot/lib no-legacy linux-x86_64
Can't locate IPC/Cmd.pm in @INC (@INC contains: /www/static-php/static-php-cli/source/openssl/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /www/static-php/static-php-cli/source/openssl/external/perl/Text-Template-1.56/lib) at /www/static-php/static-php-cli/source/openssl/util/perl/OpenSSL/config.pm line 19.
BEGIN failed--compilation aborted at /www/static-php/static-php-cli/source/openssl/util/perl/OpenSSL/config.pm line 19.
Compilation failed in require at ./Configure line 23.
BEGIN failed--compilation aborted at ./Configure line 23.
SPC\exception\RuntimeException
Command run failed with code[2]: cd '/www/static-php/static-php-cli/source/openssl' && CFLAGS='' CC='x86_64-linux-musl-gcc -static -idirafter /www/static-php/static-php-cli/buildroot/include -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ ' ./Configure no-shared zlib --prefix=/ --libdir=lib -static --with-zlib-include=/www/static-php/static-php-cli/buildroot/include --with-zlib-lib=/www/static-php/static-php-cli/buildroot/lib no-legacy linux-x86_64
at src/globals/functions.php:89
85▕ logger()->debug('Running command with direct output: ' . $cmd);
86▕ }
87▕ $ret = passthru($cmd, $code);
88▕ if ($code !== 0) {
? 89▕ throw new \SPC\exception\RuntimeException('Command run failed with code[' . $code . ']: ' . $cmd, $code);
90▕ }
91▕ return $ret;
92▕ }
93▕
1 src/SPC/util/UnixShell.php:44
2 src/SPC/builder/linux/library/openssl.php:73
SPC\util\UnixShell::exec()
[11:11:28] [CRIT] You can report this exception to static-php-cli GitHub repo.
有關static-php編譯出現(xiàn)問題的如果方便都最好提個 Issue,很有可能與編譯環(huán)境有關。也可以at我。
大佬 你也整一個群吧 有需要兄弟們就自己進群了,這樣還能交流一下靜態(tài),我們生產(chǎn)環(huán)境使用有4個月了,嘎嘎穩(wěn)定,給你點贊
大佬的 github actions 構建 又出現(xiàn) ERROR: failed to solve: process "/bin/sh -c composer install --no-dev --classmap-authoritative" did not complete successfully: exit code: 2
Unable to find image 'cwcc-spc-x86_64:latest' locally
docker: Error response from daemon: pull access denied for cwcc-spc-x86_64, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Error: Process completed with exit code 125 這個錯誤了 就是docker需要登錄