【问题标题】:Failed to commit to a server, issue with mbstring php无法提交到服务器,mbstring php 出现问题
【发布时间】:2023-03-16 20:22:01
【问题描述】:

由于某种原因,当我进行提交时,我的应用程序不会在我的服务器上构建。 服务器上没有有影响力的更新,有人知道这可能是什么吗? mbstring.so 文件位于 heroku 文件夹中。

在周末之前提交到服务器没有问题,每次构建都失败了。

remote: -----> Cleaning up...        
remote: -----> Building container_test from herokuish...        
remote: -----> Adding BUILD_ENV to build environment...        
remote:        -----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.        
remote:               Detected buildpacks: multi ruby nodejs php        
remote:        -----> Multipack app detected        
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-php        
remote: =====> Detected Framework: PHP        
remote: -----> Bootstrapping...        
remote: -----> Installing platform packages...        
remote:        - php (7.4.3)        
remote:        - ext-gd (bundled with php)        
remote:        - ext-mbstring (bundled with php)        
remote:        - ext-pcntl (bundled with php)        
remote:        - apache (2.4.41)        
remote:        - nginx (1.16.1)        
remote: PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so (libonig.so.4: cannot open shared object file: No such file or directory), /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so (/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0        
remote: PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so (libonig.so.4: cannot open shared object file: No such file or directory), /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so (/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0        
remote: -----> Installing dependencies...        
remote:        Composer version 1.9.1 2019-11-01 17:20:17        
remote:        PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so (libonig.so.4: cannot open shared object file: No such file or directory), /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so (/app/.heroku/php/lib/php/extensions/no-debug-non-zts-20190902/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0        
remote:        Loading composer repositories with package information        
remote:        Installing dependencies from lock file        
remote:        Your requirements could not be resolved to an installable set of packages.        
remote:                
remote:          Problem 1        
remote:            - Installation request for erusev/parsedown 1.7.3 -> satisfiable by erusev/parsedown[1.7.3].        
remote:            - erusev/parsedown 1.7.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
remote:          Problem 2        
remote:            - Installation request for laravel/framework v5.7.28 -> satisfiable by laravel/framework[v5.7.28].        
remote:            - laravel/framework v5.7.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.        
remote:          Problem 3        
remote:            - Installation request for lcobucci/jwt 3.3.1 -> satisfiable by lcobucci/jwt[3.3.1].        
remote:            - lcobucci/jwt 3.3.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.        
remote:          Problem 4        
remote:            - Installation request for phpoffice/phpspreadsheet 1.9.0 -> satisfiable by phpoffice/phpspreadsheet[1.9.0].        
remote:            - phpoffice/phpspreadsheet 1.9.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.        
remote:          Problem 5        
remote:            - laravel/framework v5.7.28 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.        
remote:            - rairlie/laravel-locking-session v1.1.2 requires illuminate/session ~5.0 -> satisfiable by laravel/framework[v5.7.28].        
remote:            - Installation request for rairlie/laravel-locking-session v1.1.2 -> satisfiable by rairlie/laravel-locking-session[v1.1.2].        
remote:                
remote:          To enable extensions, verify that they are enabled in your .ini files:        
remote:            - /app/.heroku/php/etc/php/php.ini        
remote:            - /app/.heroku/php/etc/php/conf.d/000-heroku.ini        
remote:            - /app/.heroku/php/etc/php/conf.d/010-ext-zend_opcache.ini        
remote:            - /app/.heroku/php/etc/php/conf.d/100-ext-gd.ini        
remote:            - /app/.heroku/php/etc/php/conf.d/110-ext-mbstring.ini        
remote:            - /app/.heroku/php/etc/php/conf.d/120-ext-pcntl.ini        
remote:            - /tmp/buildpackznVVG/conf/php/apm-nostart-overrides/apm-nostart-overrides.ini        
remote:          You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.        
remote:         
remote:  !     ERROR: Dependency installation failed!        
remote:  !             
remote:  !     The 'composer install' process failed with an error. The cause        
remote:  !     may be the download or installation of packages, or a pre- or        
remote:  !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')        
remote:  !     in your 'composer.json'.        
remote:  !             
remote:  !     Typical error cases are out-of-date or missing parts of code,        
remote:  !     timeouts when making external connections, or memory limits.        
remote:  !             
remote:  !     Check the above error output closely to determine the cause of        
remote:  !     the problem, ensure the code you're pushing is functioning        
remote:  !     properly, and that all local changes are committed correctly.        
remote:  !             
remote:  !     For more information on builds for PHP on Heroku, refer to        
remote:  !     https://devcenter.heroku.com/articles/php-support        
remote:         

【问题讨论】:

  • 除了触发构建的 git push 之外,这个问题似乎与 git 完全无关。修复构建问题(可能通过修复服务器上的环境),应该就是这样。

标签: php mbstring


【解决方案1】:

修复在这里。 显然这是 Heroku 错误,在根目录中创建 Aptfile 并添加 buildpack-apt 和 buildpack-php#v171 解决了问题。

https://github.com/gliderlabs/herokuish/issues/529

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-16
    • 1970-01-01
    • 2010-10-07
    • 1970-01-01
    • 2015-09-10
    • 1970-01-01
    • 2012-07-05
    • 2020-01-01
    相关资源
    最近更新 更多