Question

Install php8.0-mbstring on Ubuntu 16.04.7

I am trying to install mbstring, but running:

sudo apt-get install php8.0-mbstring

Returns this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php8.0-mbstring
E: Couldn't find any package by glob 'php8.0-mbstring'
E: Couldn't find any package by regex 'php8.0-mbstring'

Could you help me?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello there,

I’ll strongly recommend upgrading to a later Ubuntu version due to the fact Ubuntu 16.04 has reached its EOL.

You can still install packages using custom repositories.

  1. sudo add-apt-repository ppa:ondrej/php
  2. sudo apt-get install php8.0-mbstring

Then you’ll need to restart the web service (Nginx/Apache)

Hope that this helps!

Hi @BenitoMartinez,

Have you managed to install other php8.0 extensions? My suggestion would be to upgrade to an Ubuntu 20.04 and it would work out of the box. I know this is not the question you are asking however, Ubuntu 16.04 has EOL and all new packages are not provided for that version.

This is the official PHP response on older Ubuntu versions:

Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

as such, I’ll recommend upgrading to a newer version of Ubuntu.

Great! Thanks a lot. I updated Ubuntu and I was able to install it successfully.

Thanks @AlexDO / @KFSys