Repositories

出自Ubuntu中文

目录

软件仓库

原文出处:https://help.ubuntu.com/community/Repositories

原文作者:UbuntuWiki

授权许可:

翻译人员:FireHare 5451vs5451

校对人员:MillenniumDark

贡献人员:

适用版本:

文章状态:等待校正


Introduction(引言)

In the Free and Open Source Software world, programs are generaly available in source code tarballs. These even if very convenient to a developer who intends to study and/or improve that software program are mostly cumbersome to deal with when you want a program that Just Works.

在自由开源软件世界中,程序通常是以源代码包的形式提供给用户的。尽管这样方便了开发人员研究和改进程序,但如果仅仅是为了让程序跑起来,采用这种方式就显得不那么方便了。

If you have been a Windows and/or a Mac OS user to date you are probably used to search for a program on the internet (often offered in an executable installer) and having to download and install it. You should also be familiar with software distributed on CDs?, DVDs?, etc. which often have an autorun feature from where you can then install that program. For free and open systems like Ubuntu GNU/Linux there is software distributed in this fashion, but those are mostly proprietary and closed programs.

上网找软件(通常是安装文件),然后下载并安装它们。如果您是一位Windows或者Mac操作系统的用户,这样的经历一定不会让您感到陌生。您也许也会经常从CD、DVD等媒介上获得程序。它们大都带有自动运行功能,以便于程序的安装。自由开源系统(如Ubuntu GNU/Linux)也采用这些方式发布软件,但大多数情况下是针对那些私有的和非开源的程序而言的。

Enter the world of distributions and packages repositories!

下面让我们来了解一下软件仓库的概念,以及如何从软件仓库中获得所需的软件。

On systems like Ubuntu, free and open source software is very much often pre-packaged in nice .deb (or .rpm like in Red Hat) files which contain the programs and libraries you need. These files can be downloaded or come in CDs? (Ubuntu's CD is full of them) and installed "by hand". But you need not do it. Repositories are servers which contain sets of packages. You generally access them with tools like Synaptic.

在Ubuntu这类系统上,绝大多数自由开源软件都是事先精心打包,然后以.deb文件(或者红帽子系统中的.rpm文件)的形式向您提供您所需的程序和函数库的。您可以从网上下载或者从光盘上(Ubuntu的光盘上满是这类文件)得到它们,然后手动安装它们。但您不一定要这么做。软件仓库上存储了大量的软件包。您可以通过新立得之类的工具访问它们。

These tools can list all the packages you have installed (from your kernel to your favorite application with all the libraries in between) and the packages that are available in the repositories you have configured the tool to access to. They also let you search for simple things like "image editor".

这些工具可以列出所有您已经安装的软件包(从内核到函数库直至您平时最常用的应用程序)以及您指定的软件仓库中提供的所有软件包。同时它们也允许您进行一些简单的查询,例如通过搜索“image editor”来寻找图像编辑器。

Using these tools centralizes package management while simplifying it and giving the distributors (those who set up the repositories) a centralized way to send you updates(1) to your software.

使用这些工具对软件包进行集中管理,可以使事情变得更简单。这也为软件的发布者(那些建立软件仓库的人)开辟了一条向用户集中提供软件更新服务的渠道。

In Ubuntu you generally want to have at least Ubuntu's repositories (which may include the install CD) but it is not uncommon to have other repositories (from other packagers) set up.

对于Ubuntu的用户们来说,他们至少可以从Ubuntu的软件仓库(包含安装光盘)中获取软件。当然,其他的发布者为自己的软件包建立软件仓库也是常有的事。

Now, let us just stress this simple idea: most of the tools you'll want to use in Ubuntu are already in Ubuntu's repositories, while you can go search the net looking for packages, or even source code, for some programs. these are certainly more difficult to install and won't, most of the time, integrate well with your system.

有个简单的道理希望您能引起重视:在Ubuntu环境下,您所需要的大部分工具都可以在Ubuntu软件仓库中找到。您当然可以到网上搜寻某些软件包甚或是源代码,但它们安装起来总是更麻烦,而且多数情况下,它们不能在您的系统中很好地工作。

So now you know: no more endless searching looking for spyware infested shareware and freeware. The vast majority of useful software available for Linux is pre-packaged for you.

如果您明白了上述这些道理,就请停止在那些携带着间谍软件的共享软件和自由软件的世界中无休止地精挑细选吧。Linux系统下的绝大多数软件都已经预先打好了包,只等着您来用呢。

Managing Repositories(软件仓库的管理)

Further Reading(深入阅读)