我在 HP550 笔记本电脑上安装的 ubuntu 服务器版本 12.04 有问题,当我尝试时sudo apt-get install <programname>,例如apache2它不会工作,说E: Unable to locate package apache2。
我试图查看/编辑来源。但是它们将不起作用,或者gedit命令也被破坏了,我正在gedit /etc/apt/sources.list为那些想知道的人尝试,这是计算机网络配置不正确的情况吗?不过,它在安装中很容易下载了一个语言包。我该如何解决?及时答复将不胜感激。
jac*_*rdy 94
sudo apt-get update在尝试安装软件包之前尝试运行。安装后系统没有最新的软件包列表,因此您将无法找到该软件包。
完成此操作后,您应该可以正常安装。
ear*_*Lon 16
这是一个示例sources.list 文件。我使用程序net-select-apt为我选择了最快的镜像。另外,请注意这是针对12.04/Precise 的。
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.symnds.com/ubuntu/ precise main restricted
deb-src http://mirror.symnds.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.symnds.com/ubuntu/ precise-updates main restricted
deb-src http://mirror.symnds.com/ubuntu/ precise-updates main restricted
## N.B. 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.
deb http://mirror.symnds.com/ubuntu/ precise universe
deb-src http://mirror.symnds.com/ubuntu/ precise universe
deb http://mirror.symnds.com/ubuntu/ precise-updates universe
deb-src http://mirror.symnds.com/ubuntu/ precise-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://mirror.symnds.com/ubuntu/ precise multiverse
deb-src http://mirror.symnds.com/ubuntu/ precise multiverse
deb http://mirror.symnds.com/ubuntu/ precise-updates multiverse
deb-src http://mirror.symnds.com/ubuntu/ precise-updates multiverse
## 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://mirror.symnds.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirror.symnds.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirror.symnds.com/ubuntu/ precise-security main restricted
deb-src http://mirror.symnds.com/ubuntu/ precise-security main restricted
deb http://mirror.symnds.com/ubuntu/ precise-security universe
deb-src http://mirror.symnds.com/ubuntu/ precise-security universe
deb http://mirror.symnds.com/ubuntu/ precise-security multiverse
deb-src http://mirror.symnds.com/ubuntu/ precise-security 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 precise partner
deb-src http://archive.canonical.com/ubuntu precise 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 precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
Run Code Online (Sandbox Code Playgroud)
sudo apt-get update
sudo apt-cache search apache2
sudo apt-get install apache2
这里有一些可选的存储库,您可以继续添加到sources.list的底部。
#Chromium
deb http://ppa.launchpad.net/chromium-daily/stable/ubuntu precise main
deb-src http://ppa.launchpad.net/chromium-daily/stable/ubuntu precise main
Run Code Online (Sandbox Code Playgroud)
小智 0
我也遇到过这个问题。我被告知我需要下载程序依赖项或“包”,然后才能在 Ubuntu 上安装该程序。你可以sudo apt-get update先尝试一下。
我认为 Apache 是第三方供应商,因此这就是 Ubuntu 找不到该软件包的原因。尝试访问 Apache 站点本身,查找可以下载并使用 Ubuntu 打开的适用于 Ubuntu 或 Linux 的软件包。然后尝试sudo apt-get install <program>
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
504587 次 |
| 最近记录: |