deb
命令。但是在我的安装中似乎没有这个命令。我应该从哪里获取这个命令?有没有其他解决办法?
deb
命令。但是在我的安装中似乎没有这个命令。deb
不是一个命令。它在/etc/apt/sources.list
文件中用于指示Debian软件仓库。
所以,如果我的sources.list文件中有deb http://archive.ubuntu.com/ubuntu/ quantal main restricted - 它表示:我有一个基于http://archive.ubuntu.com/ubuntu/的Debian存档,其中的发行版是quantal,组件是main和restricted。The source list is designed to support any number of active sources and a variety of source media. The file lists one source per line, with the most preferred source listed first. The format of each line is: type uri args. The first item, type determines the format for args. uri is a Universal Resource Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator, or URL.
The deb type describes a typical two-level Debian archive, distribution/component. The format for a sources.list entry using the deb and deb-src types is:
deb [ options ] uri distribution [component1] [component2] [...]
The URI for the deb type must specify the base of the Debian distribution, from which APT will find the information it needs. distribution can specify an exact path, in which case the components must be omitted and distribution must end with a slash (/). This is useful for when the case only a particular sub-section of the archive denoted by the URI is of interest. If distribution does not specify an exact path, at least one component must be present.
sources.list
位于12.04版本的/etc/apt/
目录下。 - Ahmed Fasihdeb
不是一个Unix命令。如果你有类似下面这样的一行(用于Docker的源代码):
deb https://apt.dockerproject.org/repo ubuntu-xenial main
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
命令,然后你就可以轻松地从这个源中找到新的软件包了。deb
不是命令行。如果你有一个deb文件,URL应该是这样的:deb http://download.virtualbox.org/virtualbox/debian trusty contrib
编辑
像@muru的提交一样,您需要在/etc/apt/source.list.d/
文件夹中创建一个带有扩展名.list
的新文件:
示例: 我想下载Oracle虚拟机,创建新文件:
sudo gedit /etc/apt/sources.list.d/oracle-virtualbox-trusty.list
/etc/apt/sources.list
文件以添加一行。在/etc/apt/sources.list.d
目录下创建一个扩展名为.list
的新文件,并将该行添加进去。/etc/apt/sources.list.d
中创建.list
文件,并且通常会推荐这样做。但我看不出坚持让用户手动添加的第三方软件源放在/etc/apt/sources.list.d
中的理由。有些配置文件最好不要由用户编辑(例如,使用/etc/profile.d
而不是/etc/profile
,可以说使用/etc/sudoers.d
而不是/etc/sudoers
),但sources.list
经常会被更改。(甚至由Ubiquity定制为区域镜像。) - Eliah Kagan/etc/apt/sources.list
不是那种可以放任不管以便更顺利升级的配置文件之一 - 因为这通常(也许通常)是在强烈建议下,优先创建X.d
目录中的文件而不是编辑X
文件的动机。我并不是在暗示Ubiquity以任何方式启用第三方软件源。然而,你还没有解释这些软件源有什么特别之处,以至于将它们放入sources.list
实际上是错误的(即,“永远不要编辑...”)。 - Eliah Kagansource.list
来添加存储库。
相反,您可以使用add-apt-repository
,就像为PPA一样操作。sudo add-apt-repository 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main'
deb
行作为一个单独的参数传递给命令。sudo apt-get update
这不是CLI命令。
这是关于某个Debian软件包仓库的信息(也可被Ubuntu使用)。
如果您想要使用这个仓库:
以管理员权限打开文件/etc/apt/sources.list
。
在该文件中添加一行包含有关仓库信息的内容,以deb ...
开头。
保存文件。
运行以下命令:
apt-get update
现在您可以使用这个仓库了。