Mbstring as a multibyte string functions provider helps you to handle multibyte encodings in PHP. Let’s see how to install PHP mbstring on Alpine Linux.
Prerequisites
- Alpine Linux
- sudo privileges
Install PHP Mbstring on Alpine Linux
Step 1. Add the following repository.
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
Step 2. Update the packages.
apk update && apk upgrade
Step 3. Install php7.4 together with mbstring.
apk add php7 php7-mbstring
Step 4. Verify the installation.
php7 -m
Output:
[PHP Modules]
Core
date
...
mbstring
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.