Fix requires ext-mbstring * -> it is missing from your system – mbstring is a non-default extension. This means it is off by default. You must explicitly enable the module with configuration options. To find out more about mbstring, you can read the article of mbstring.
mbstring is a non-default php extension. This extension is not enabled by default.
The following configuration options are related to the mbstring module.
–enable-mbstring: Enables the mbstring function. This option is required to use the mbstring function.
–disable-mbregex: Disable regular expression functions with multibyte character support.
Some conditions even mbstring is not installed on linux, therefore, we have to do this installation manually. For example, what I have experienced is as in the following:
- codeigniter4/framework v4.1.5 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension. - phpunit/phpunit 9.5.11 requires ext-mbstring * -> it is missing from your system. Install or enable PHP's mbstring extension.
Install mbstring Ubuntu
To do this installation, make sure the PHP version you are using.
For example I use PHP 8.0 version. Therefore, the command I use is:
sudo apt install php8.0-mbstring
Wait for the installation to finish. If the installation is correct, you can see results like this:
neon@NEON:~/Documents/KERJA/BLOG/CHIPPIKO/CODEIGNITER 4/multiple_input_form$ sudo apt install php8.0-mbstring [sudo] password for neon: Reading package lists... 0% Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libonig5 The following NEW packages will be installed: libonig5 php8.0-mbstring 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 142 kB/536 kB of archives. After this operation, 1,683 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [774 B] Ign:2 https://mirror.papua.go.id/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1 Get:2 https://mr.heru.id/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1 [142 kB] Fetched 143 kB in 1min 16s (1,889 B/s) Selecting previously unselected package libonig5:amd64. (Reading database ... 214021 files and directories currently installed.) Preparing to unpack .../libonig5_6.9.4-1_amd64.deb ... Unpacking libonig5:amd64 (6.9.4-1) ... Selecting previously unselected package php8.0-mbstring. Preparing to unpack .../php8.0-mbstring_8.0.14-1+ubuntu20.04.1+deb.sury.org+1_amd64.deb ... Unpacking php8.0-mbstring (8.0.14-1+ubuntu20.04.1+deb.sury.org+1) ... Setting up libonig5:amd64 (6.9.4-1) ... Setting up php8.0-mbstring (8.0.14-1+ubuntu20.04.1+deb.sury.org+1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for php8.0-cli (8.0.14-1+ubuntu20.04.1+deb.sury.org+1) ...
Hopefully this article is useful.