我收到错误消息 E: Unable to locate package php 在 docker 上的 raspbian 镜像中安装 php 时。
我已经从 docker hub 拉取了 raspbian/jessie 镜像并运行它。 在这个容器中,我使用了 1.apt update 2. apt upgrade 3. apt install apache2
然后尝试安装php
一切看起来都很好,直到 apt install apache2
root@516cf9de5248:/# apt install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@516cf9de5248:/# apt install php php-fpm php-curl php-gd php-intl php-mbstring php-mysql php-soap php-xml php-xmlrpc php-zip libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php
E: Unable to locate package php-fpm
E: Unable to locate package php-curl
E: Unable to locate package php-gd
E: Unable to locate package php-intl
E: Unable to locate package php-mbstring
E: Unable to locate package php-mysql
E: Unable to locate package php-xml
E: Unable to locate package php-xmlrpc
E: Unable to locate package php-zip
E: Unable to locate package libapache2-mod-php
我试过 apt-get update 之后还是不行
答案 0 :(得分:0)
运行 sudo apt-get install php5
对我有用,即使它不是最好的安全。