Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
154 views
in Technique[技术] by (71.8m points)

php - Can't run composer update missing mbstring

SOLVED: I ended up using php 7.2 instead of php7.4 i removed 7.4 and install 7.2

So i am trying to configure Linux Ubuntu 20.04 server to run laravel, and i have nginx, mysql php7.4-fpm installed, i cloned my project from gitlab and now i want to run composer update, but it always give me this error:

    composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework v7.9.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.9.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.9.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.8.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.8.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.7.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.7.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.6.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.6.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.6.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.5.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.5.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.5.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.4.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.3.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.2.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.2.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.2.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.19.1 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.19.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.18.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.17.2 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.17.1 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.17.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.16.1 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.16.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.15.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.14.1 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.14.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.13.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.12.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.11.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.10.3 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.10.2 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.10.1 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.10.0 requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - laravel/framework v7.1.3 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.1.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.1.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.1.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.8 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.7 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.6 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.5 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.4 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.3 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.2 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.1 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework v7.0.0 requires ext-mbstring * -> the requested PHP exte                                        nsion mbstring is missing from your system.
    - laravel/framework 7.x-dev requires ext-mbstring * -> the requested PHP ext                                        ension mbstring is missing from your system.
    - Installation request for laravel/framework ^7.0 -> satisfiable by laravel/                                        framework[7.x-dev, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.                                        7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.10.0, v7.10.1, v7.10.2, v7.10.3, v                                        7.11.0, v7.12.0, v7.13.0, v7.14.0, v7.14.1, v7.15.0, v7.16.0, v7.16.1, v7.17.0,                                         v7.17.1, v7.17.2, v7.18.0, v7.19.0, v7.19.1, v7.2.0, v7.2.1, v7.2.2, v7.3.0, v7.                                        4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.                                        8.1, v7.9.0, v7.9.1, v7.9.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.4/cli/php.ini
    - /etc/php/7.4/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.4/cli/conf.d/10-opcache.ini
    - /etc/php/7.4/cli/conf.d/10-pdo.ini
    - /etc/php/7.4/cli/conf.d/20-calendar.ini
    - /etc/php/7.4/cli/conf.d/20-ctype.ini
    - /etc/php/7.4/cli/conf.d/20-exif.ini
    - /etc/php/7.4/cli/conf.d/20-ffi.ini
    - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.4/cli/conf.d/20-ftp.ini
    - /etc/php/7.4/cli/conf.d/20-gettext.ini
    - /etc/php/7.4/cli/conf.d/20-iconv.ini
    - /etc/php/7.4/cli/conf.d/20-json.ini
    - /etc/php/7.4/cli/conf.d/20-mysqli.ini
    - /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.4/cli/conf.d/20-phar.ini
    - /etc/php/7.4/cli/conf.d/20-posix.ini
    - /etc/php/7.4/cli/conf.d/20-readline.ini
    - /etc/php/7.4/cli/conf.d/20-shmop.ini
    - /etc/php/7.4/cli/conf.d/20-sockets.ini
    - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
  You can also run `php --ini` inside terminal to see which files are used by PH                                        P in CLI mode.

When i run php --ini this is the output

administrator@orion:/var/www/truckstock$ php --ini
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File:         /etc/php/7.4/cli/php.ini
Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
Additional .ini files parsed:      /etc/php/7.4/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.4/cli/conf.d/10-opcache.ini,
/etc/php/7.4/cli/conf.d/10-pdo.ini,
/etc/php/7.4/cli/conf.d/20-calendar.ini,
/etc/php/7.4/cli/conf.d/20-ctype.ini,
/etc/php/7.4/cli/conf.d/20-exif.ini,
/etc/php/7.4/cli/conf.d/20-ffi.ini,
/etc/php/7.4/cli/conf.d/20-fileinfo.ini,
/etc/php/7.4/cli/conf.d/20-ftp.ini,
/etc/php/7.4/cli/conf.d/20-gettext.ini,
/etc/php/7.4/cli/conf.d/20-iconv.ini,
/etc/php/7.4/cli/conf.d/20-json.ini,
/etc/php/7.4/cli/conf.d/20-mysqli.ini,
/etc/php/7.4/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.4/cli/conf.d/20-phar.ini,
/etc/php/7.4/cli/con

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here is the command you need to execute on your server

sudo apt update
sudo apt install php-mbstring

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...