/etc/apt/sources.list中缺少来源,我该如何取回它们?

不知怎的,我的Ubuntu安装找不到我认为非常常见的包….

E: Unable to locate package php5-curl E: Unable to locate package php5-gd 

我知道这与我的消息来源有关,但是,我不确定我需要哪个来源或者包含哪些来源。

这些是我运行的命令

 sudo apt-get install php5-curl sudo apt-get install php5-gd 

这是/etc/apt/sources.list的内容:

 # deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ dists/oneiric/main/binary-i386/ # deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ oneiric main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. ## Major bug fix updates produced after the final release of the ## distribution. ## NB software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. ## NB 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. ## NB 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. ## 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 oneiric partner # deb-src http://archive.canonical.com/ubuntu oneiric partner ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. # deb http://extras.ubuntu.com/ubuntu oneiric main # deb-src http://extras.ubuntu.com/ubuntu oneiric main # deb http://repository.spotify.com stable non-free 

您似乎已删除所有软件源。 要重新添加它们,请启动软件中心,然后转到菜单中的编辑 – >软件源,然后选中Ubuntu软件选项卡下的所有框:

在此处输入图像描述

然后单击“关闭”,系统将询问您的密码,然后为您生成新的源文件。 您可能不需要选中源代码框:

  • 我真的需要我的存储库列表中的“源代码”吗?