sudo phpenmod mbstring doesn't work, /etc/php/8.1/mods-available is empty. Ubuntu-22.04

295 views Asked by At
ubuntu@ubuntu:/etc/apache2/conf-enabled$ sudo phpenmod mbstring
WARNING: Module mbstring ini file doesn't exist under /etc/php/8.1/mods-available
WARNING: Module mbstring ini file doesn't exist under /etc/php/8.1/mods-available
WARNING: Module mbstring ini file doesn't exist under /etc/php/8.1/mods-available
WARNING: Module mbstring ini file doesn't exist under /etc/php/8.1/mods-available
ubuntu@ubuntu:/etc/apache2/conf-enabled$

The directory is empty:

ubuntu@ubuntu:/etc/php/8.1/mods-available$ ls
ubuntu@ubuntu:/etc/php/8.1/mods-available$

When I do sudo apt-get install php-mbstring I get 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I checked where it was located I got this.

ubuntu@ubuntu:~$ whereis php8.1-mbstring
php8.1-mbstring: /usr/share/php8.1-mbstring

I then tried manually moving the package to /etc/php/8.1/mods-available but I still got an error:

ubuntu@ubuntu:~$ sudo phpenmod mbstring
WARNING: Directory /etc/php/8.1/cgi/conf.d doesn't exist, not enabling the module
WARNING: Directory /etc/php/8.1/phpdbg/conf.d doesn't exist, not enabling the module
WARNING: Directory /etc/php/8.1/cli/conf.d doesn't exist, not enabling the module
0

There are 0 answers