我想为运行以下操作系统的机器添加 Mysqli 支持:
服务器版本:Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3
我宁愿不更新更多不必要的东西。
我运行以下命令:sudo apt-get install php5-mysql
但是,由于 ubuntu 版本较旧,我得到以下信息。
WARNING: The following packages cannot be authenticated!
php5-cli php5-mysql php5-mhash php5-xsl php5-pspell php5-snmp php5-curl
php5-xmlrpc php5-sqlite php5-gd libapache2-mod-php5 php5-common
Install these packages without verification [y/N]? Y
Err http://gr.archive.ubuntu.com gutsy-updates/main php5-cli 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-cli 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-mysql 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-mhash 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-xsl 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-pspell 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-snmp 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-curl 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-xmlrpc 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-sqlite 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-gd 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main libapache2-mod-php5 5.2.3-1ubuntu6.4
404 Not Found
Err http://security.ubuntu.com gutsy-security/main php5-common 5.2.3-1ubuntu6.4
404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-cli_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-mhash_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-xsl_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-pspell_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-snmp_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-curl_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-xmlrpc_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-sqlite_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-gd_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/libapache2-mod-php5_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_5.2.3-1ubuntu6.4_i386.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
问题
- 我可以使用其他方法而不是 sudo-apt get 来添加 mysqli 功能吗?
- 即使成功,这会破坏系统吗?
更新:
我尝试按照以下说明添加其他来源:
https://superuser.com/questions/339537/where-can-i-get-therepositories-for-old-ubuntu-versions
我在文件中有以下内容/etc/apt/sources.list
:
# deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
#deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://gr.archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates universe
deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#deb http://gr.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
# deb-src http://gr.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu gutsy partner
# deb-src http://archive.canonical.com/ubuntu gutsy partner
deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb http://security.ubuntu.com/ubuntu gutsy-security universe
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe
deb http://security.ubuntu.com/ubuntu gutsy-security multiverse
deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse
# Required
deb http://old-releases.ubuntu.com/ubuntu/gutsy main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/gutsy-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/gutsy-security main restricted universe multiverse
答案1
使用的替代方法apt
是获取.deb
新软件包的文件并dpkg -i
使用它。无论哪种方式,我都支持@meewoK 并建议开始新构建。当我更新服务器操作系统时,我只需构建一台全新的计算机并进行全新安装,然后将所有内容迁移到它。
我搜索了一下,似乎你最好的选择是dpkg -i
https://superuser.com/questions/169672/linux-offline-install-apt-get
https://unix.stackexchange.com/questions/97233/fixing-a-broken-packet-system-apt-get
第二个链接让我想到 Unix.SE 上的专家可能会提供帮助。您可以在此处标记自己的问题并请求迁移到那里……?