WARNING: Module ini file doesn't exist under /etc/php/7.0/mods-available

前端 未结 3 847
难免孤独
难免孤独 2021-02-07 01:56

I have uninstalled php7 and all its modules from ubuntu, and when I try to reinstall the modules, I get the following error for each php module, and although the module is insta

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 02:58

    I came here because I had trouble installing Phpmyadmin on Ubuntu after I upgrade from php 7.0 to 7.1

    Here is the tricks

    1) remove php version (7.0 for instance - adapt the command line)

    sudo apt-get purge php7.0-common
    

    Note --> You should check the list of packaged that will be removed.

    2) Install php modules

    sudo apt-get install php7.1-mbstring
    sudo apt-get install php7.1-mcrypt
    ...
    

    3) activate the modules

    sudo phpenmod mbstring
    sudo phpenmod mcrypt
    

    (option for apache) activate php7.1

    sudo a2enmod php7.1
    

    And of course restart your server (apache in this case)

    sudo systemctl restart apache2
    

提交回复
热议问题