For instance, on Ubuntu Xenial, I need to install the mbstring PHP extension. I issue the command sudo apt-get install php-mbstring to do so.

With dpkg, I can see two packages related to the module: php-mbstring and php7.0-mbstring.

Did they get installed together? And if they're similar packages, how can I know which one is being used (or which one to use)?

  • Use apt show php-mbstring. The answer is in the package description.
    – user535733
    Oct 18 '17 at 22:01
  • This package is a dependency package, which depends on Debian's default PHP version (currently 7.0). Does that mean php-mbstring is the module and php7.0-mbstring the parent implementation of MBSTRING on top of it?
    – David
    Oct 18 '17 at 22:42

When Debian changes to another version of PHP (8.0), php-mbstring will pull in the correct package automatically.

php#.#-mbstring has the code.

php-mbstring has no code, and simply depends upon the correct package with code. This is called a transitional package or dummy package or metapackage.

The same method of a generically-named metapackge to manage automatic upgrades is used to upgrade your kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.