簡體   English   中英

apt-get install php5不起作用

[英]Apt-get install php5 do not work

我在虛擬機上安裝php。 我使用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?

我已經檢查了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

我還使用了apt-get updateapt-get upgrade但是仍然失敗了...

最后,我嘗試使用以下命令安裝php7:

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

但是LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php命令輸出以下內容: -bash: add-apt-repository: command not found

我一直在尋找技巧來解決這兩個問題,但是我什么也沒找到,因此我需要一些幫助以繼續推動這一目標...

謝謝

西班牙的debian倉庫現在下降了(經常掉下來)。 請更改為另一個存儲庫,例如:ftp.pt.debian.org

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM