我正忙着为我的网站设置我的ec2。我使用的是Ubuntu18.04AMI(亚马逊机器映像).I,需要运行以下命令:
sudo apt-get install php7.0 php7.0-mcrypt php7.0-mysql mysql-server
apache2
但是,当我尝试执行安装时,我收到以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.0-remctl' for regex 'php7.0'
Note, selecting 'php7.0-common' for regex 'php7.0'
Note, selecting 'php-remctl' instead of 'php7.0-remctl'
E: Unable to locate package libapache2-mod-php7.0
E: Couldn't find any package by glob 'libapache2-mod-php7.0'
E: Couldn't find any package by regex 'libapache2-mod-php7.0'
E: Unable to locate package php7.0-mysql
E: Couldn't find any package by glob 'php7.0-mysql'
E: Couldn't find any package by regex 'php7.0-mysql'
我在Windows10上通过MobaXterm运行这些命令。你知道我做错了什么吗??
发布于 2019-05-20 05:38:02
PHP7.0已经过时了-- it reached end-of-life in January 2019 --而且它在Ubuntu18.04中是不可用的。此版本的合适版本是PHP7.2(例如php7.2
、php7.2-mysql
等);您需要相应地更改安装命令。
mcrypt扩展was deprecated in PHP 7.1和随后的removed in PHP 7.2。如果您在应用程序中使用此扩展,请使用you will need to rework those parts of your code。
https://stackoverflow.com/questions/56212071
复制相似问题