簡體   English   中英

如何在 Wheezy Debian php 5.6 中安裝 php5-gd

[英]How to install php5-gd in Wheezy Debian php 5.6

我的 2 個網站無法正常工作 bcs 我無法將 php5-gd 庫安裝到 Debian Wheezy php5.6 ...

我試過

aptitude 安裝 php5-gd,系統說我錯過了 2 個依賴項,我無法找到或安裝...

aptitude install php5-gd

sudo apt-get install php5-gd

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:

php5-gd :
Depends: libt1-5 (>= 5.1.0) but it is not installable

Depends: libvpx1 (>= 1.0.0) but it is not installable

E: Unable to correct problems, you have held broken packages.

你有沒有先更新你的apt-get?

第一次運行:

sudo apt-get update

然后如果成功運行;

sudo apt-get upgrade

如果你運行 df -lah

首先,它可能會顯示您的 /boot 處於 100% 嘗試; sudo apt-get autoremove

然后從頭開始,然后試試你的php5-gd

當失敗時嘗試:

sudo apt-get install -f

Wheezy真的過時了。 它於 2013 年發布,其支持於 2018 年結束。

這是從Debian 長期支持頁面導入的表格:

支持表,在上面的鏈接中顯示為文本

最好的辦法是升級到buster (Debian 10,2019 年7 月發布,(可能)支持到 2024 年。

另一種選擇是升級到jessie (2015 年 4 月發布,安全支持於 2018 年結束,社區支持於 2020 年 6 月結束),這將使您有幾個月的時間用更新的系統更換您的系統。

最后一個選擇,如果你真的需要留在 Wheezy 上,是使用backports或一個精心固定的更新版本,只為有問題的包。

由於 Wheezy舊了,沒有任何存儲庫仍在托管(可能在某處有它的存檔,但您不會獲得更新)。 我將引導您升級到 Jessie 並改用其向后移植。

這些說明應該適用於任何版本,因此您可以(應該!)使用buster代替jessie ,盡管跨這么多版本升級幾乎肯定需要相當多的工作。

1. 更新您的來源:

$ find /etc/apt/sources.list* -name '*.list' |sudo xargs sed -i 's/wheezy/jessie/g'

2. 將 Jessie 向后移植到這些文件之一(如果尚不存在):

deb http://deb.debian.org/debian jessie-backports main

3. 更新和升級,最好從 X11 外部(例如Ctrl + Alt + F2的控制台):

$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get autoremove
$ sudo reboot

之后,您可以嘗試對系統進行故障排除。

暫無
暫無

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

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