简体   繁体   English

apt-get install php5不起作用

[英]Apt-get install php5 do not work

I am installing php on my virtual machine. 我在虚拟机上安装php。 I use apt-get install php5 but it throws this error: 我使用apt-get install php5但它抛出此错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common php5-json php5-readline
Suggested packages:
  php-pear php5-user-cache
The following NEW packages will be installed:
  libapache2-mod-php5 libonig2 libqdbm14 php5 php5-cli php5-common php5-json php5-readline
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 255 kB/5,401 kB of archives.
After this operation, 21.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://ftp.es.debian.org/debian/ jessie/main libonig2 amd64 5.9.5-3.2
  Could not connect to ftp.es.debian.org:80 (82.194.78.250). - connect (111: Connection refused)
Err http://ftp.es.debian.org/debian/ jessie/main libqdbm14 amd64 1.8.78-5+b1
  Unable to connect to ftp.es.debian.org:http:
Err http://ftp.es.debian.org/debian/ jessie/main php5-json amd64 1.3.6-1
  Unable to connect to ftp.es.debian.org:http:
E: Failed to fetch http://ftp.es.debian.org/debian/pool/main/libo/libonig/libonig2_5.9.5-3.2_amd64.deb  Could not connect to ftp.es.debian.org:80 (82.194.78.250). - connect (111: Connection refused)

E: Failed to fetch http://ftp.es.debian.org/debian/pool/main/q/qdbm/libqdbm14_1.8.78-5+b1_amd64.deb  Unable to connect to ftp.es.debian.org:http:

E: Failed to fetch http://ftp.es.debian.org/debian/pool/main/p/php-json/php5-json_1.3.6-1_amd64.deb  Unable to connect to ftp.es.debian.org:http:

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have checked the sources.list file and is the following: 我已经检查了sources.list文件,如下所示:

# deb cdrom:[Debian GNU/Linux 8.5.0 _Jessie_ - Official amd64 NETINST Binary-1 20160604-15:31]/ jessie main

#deb cdrom:[Debian GNU/Linux 8.5.0 _Jessie_ - Official amd64 NETINST Binary-1 20160604-15:31]/ jessie main

deb http://ftp.es.debian.org/debian/ jessie main
deb-src http://ftp.es.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.es.debian.org/debian/ jessie-updates main
deb-src http://ftp.es.debian.org/debian/ jessie-updates main

#jessie bug security fix

deb http://security.debian.org/ jessie/updates main contrib non-free

I also used the apt-get update and apt-get upgrade but still with this failures... 我还使用了apt-get updateapt-get upgrade但是仍然失败了...

Finally I tried to install php7 with: 最后,我尝试使用以下命令安装php7:

sudo apt-get install python-software-properties
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update

But the LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php command output this: -bash: add-apt-repository: command not found 但是LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php命令输出以下内容: -bash: add-apt-repository: command not found

I have searched for tips to solve boths but I did no find anything so I need some help to keep pushing this... 我一直在寻找技巧来解决这两个问题,但是我什么也没找到,因此我需要一些帮助以继续推动这一目标...

Thank you 谢谢

The Spain debian repos is down NOW (often falls). 西班牙的debian仓库现在下降了(经常掉下来)。 Please, change to another respos, for example: ftp.pt.debian.org 请更改为另一个存储库,例如:ftp.pt.debian.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM