我正在尝试通过以下方式安装 php:
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-iconv
但我收到以下消息和错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.0-common' instead of 'php7.0-iconv'
The following extra packages will be installed:
libcurl3 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libmcrypt4 libssl1.0.2 libtiff5 libvpx2
libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 libxslt1.1 libzip4 php-common php7.0-cli
php7.0-json php7.0-opcache php7.0-readline php7.0-xml
Suggested packages:
php-pear libgd-tools libmcrypt-dev mcrypt
The following NEW packages will be installed:
libapache2-mod-php7.0 libcurl3 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libmcrypt4 libssl1.0.2
libtiff5 libvpx2 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxpm4 libxslt1.1 libzip4
php-common php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-intl php7.0-json
php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-readline php7.0-xml php7.0-xsl
php7.0-zip
0 upgraded, 34 newly installed, 0 to remove and 20 not upgraded.
Need to get 7632 kB of archives.
After this operation, 28.9 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
libssl1.0.2 php-common php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-cli
libapache2-mod-php7.0 libzip4 php7.0 php7.0-curl php7.0-gd php7.0-intl php7.0-mbstring
php7.0-mcrypt php7.0-mysql php7.0-xml php7.0-xsl php7.0-zip
E: There are problems and -y was used without --force-yes
请帮忙
答案1
apt-get update
在最终运行之前尝试重新运行
sudo apt-get 安装 php7.0* libapache2-mod-php7.0
没有-y
和 没有--force-yes
。