「E: 問題が発生しており、--force-yes なしで -y が使用されました」と PHP のインストール時に表示される

「E: 問題が発生しており、--force-yes なしで -y が使用されました」と PHP のインストール時に表示される

次のようにして 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

関連情報