如何从Ubuntu软件存储库外部安装软件

在Linux系统如Ubuntu上,除了使用内置软件中心,还可以通过多种方式安装外部软件,包括DEB软件包、第三方软件包存储库、PPA(个人软件包档案)以及直接从源代码编译。DEB包允许从官方网站直接下载安装,第三方存储库和PPA提供额外的软件源,而从源编译适合获取最新或实验性的软件。二进制程序则以未打包的二进制形式分发,适用于某些特定情况。尽管存在风险,但只要确保来源可信,Linux用户也能安全地安装和管理软件。
摘要由CSDN通过智能技术生成
ubuntu-software-center

On Linux, you install software from package management applications like the Ubuntu Software Center. But not every piece of software is available in your Linux distribution’s software repositories.

在Linux上,您可以从软件包管理应用程序(如Ubuntu Software Center)中安装软件。 但是,并不是Linux发行版的软件存储库中都提供了所有软件。

You should only install software from sources you trust, just like on Windows. Much of this advice also applies to other Linux distributions, so we’ll note what’s Ubuntu-specific and what’s Linux-in-general.

您只能从信任的来源安装软件,就像在Windows上一样。 这些建议中的大部分也适用于其他Linux发行版 ,因此我们将注意什么是Ubuntu特定的,什么是Linux通用的。

DEB软件包文件 (DEB Package Files)

Ubuntu software packages are in .deb file format. This includes packages you download from the Ubuntu Software Center and with apt-get — they’re all .deb files.

Ubuntu软件包为.deb文件格式。 这包括您从Ubuntu软件中心下载并带有apt-get的软件包,它们都是.deb文件。

However, you can also install .deb packages from outside of Ubuntu’s software repositories. Many companies that produce software for Linux offer it in .deb format. For example, you can download .deb files for Google Chrome, Google Earth, Steam for Linux, Opera, and even Skype, from their official websites. Double-click the file and it will open in the Ubuntu Software Center, where you can install it.

但是,您也可以从Ubuntu软件存储库外部安装.deb软件包。 许多为Linux生产软件的公司都提供.deb格式的软件。 例如,您可以从其官方网站下载适用于Google Chrome,Google Earth,适用于Linux的Steam,Opera甚至Skype的.deb文件。 双击该文件,它将在Ubuntu软件中心打开,您可以在其中安装它。

Ubuntu is based on Debian, which created the .deb package format. Other Linux distributions will have their own package format if they’re not based on Debian. For example, Fedora and other Red Hat-based distributions use .rpm packages. Many companies that offer software for Linux offer it in a variety of package formats for different distributions.

Ubuntu基于Debian,后者创建了.deb软件包格式。 如果其他Linux发行版不基于Debian,则将具有自己的软件包格式。 例如,Fedora和其他基于Red Hat的发行版都使用.rpm软件包。 许多为Linux提供软件的公司都以各种软件包格式提供了针对不同发行版的软件。

install-deb-file-in-ubuntu-software-center

第三方软件包存储库 (Third-Party Package Repositories)

Ubuntu runs its own package repositories full of open-source (and some closed-source) software compiled and packaged for Ubuntu. However, anyone can set up their own package repositories.

Ubuntu运行自己的软件包存储库,其中充满了为Ubuntu编译和打包的开源(和某些闭源)软件。 但是,任何人都可以建立自己的软件包存储库。

Third-party package repositories are often added to your system seamlessly. For example, when you install Google Chrome or Steam from a .deb file, the .deb file adds the official Google or Valve software repository to your system. When the package is updated in the repository, you’ll be notified of updates and can install them via the Software Updater application. Unlike on Windows, updates for all your installed software can be managed in one place.

第三方软件包系统信息库通常无缝地添加到您的系统中。 例如,当您从.deb文件安装Google Chrome或Steam时,.deb文件会将官方的Google或Valve软件存储库添加到您的系统中。 在存储库中更新软件包后,系统会通知您更新,并可以通过Software Updater应用程序进行安装。 与Windows不同,可以在一个地方管理所有已安装软件的更新。

You can view your software repositories and add more (if you know their details) from the Software Sources application included with Ubuntu.

您可以查看软件存储库,并从Ubuntu随附的Software Sources应用程序中添加更多信息(如果您知道它们的详细信息)。

Other Linux distributions also support third-party repositories, but repositories and the software they contain are distribution-specific.

其他Linux发行版也支持第三方存储库,但是存储库及其包含的软件是特定于发行版的。

repositories-in-software-sources-on-ubuntu

个人包装档案(PPA) (Personal Package Archives (PPAs))

PPAs are another form of third-party package repositories. They’re hosted on Canonical’s Launchpad system, where anyone can create a PPA.

PPA是第三方软件包存储库的另一种形式。 它们托管在Canonical的Launchpad系统上,任何人都可以在其中创建PPA。

PPAs often contain experimental software that hasn’t been officially added to Ubuntu’s main, stable repositories. They may also contain newer versions of software that aren’t yet considered stable enough to make it to Ubuntu’s main repositories.

PPA通常包含尚未正式添加到Ubuntu的主要稳定存储库中的实验软件。 它们可能还包含较新的软件版本,但尚未被认为足够稳定,无法安装到Ubuntu的主要存储库中。

For example, Ubuntu’s Wine Team offers a PPA with the latest releases of the Wine software for running Windows applications on Linux. To add it, you would add the following line to the Software Sources application above:

例如, Ubuntu的Wine团队为PPA提供了最新版本的Wine软件,用于在Linux上运行Windows应用程序 。 要添加它,请将以下行添加到上面的“软件源”应用程序中:

ppa:ubuntu-wine/ppa

ppa:ubuntu-wine / ppa

Each PPA page on Canonical’s Launchpad website includes instructions for adding the PPA to your system. Once a PPA is added to your system, you can install packages from the PPA using standard software like the Ubuntu Software Center, Software Updater, and apt-get command-line tool.

Canonical Launchpad网站上的每个PPA页面都包含有关将PPA添加到系统的说明。 将PPA添加到系统后,您可以使用标准软件(例如Ubuntu Software Center,Software Updater和apt-get命令行工具)从PPA安装软件包。

add-ppa-in-ubuntu

从源编译 (Compiling From Source)

All binary software is compiled from source code. Ubuntu’s .deb packages contain software compiled specifically for the release of Ubuntu you’re using. These applications are compiled to use the software libraries available for your Ubuntu release.

所有二进制软件都是从源代码编译的。 Ubuntu的.deb软件包包含专门为您使用的Ubuntu版本而编译的软件。 编译这些应用程序以使用可用于Ubuntu版本的软件库。

The developers of a particular piece of software generally release the software in source code form. Linux distributions take the source code, compile it, and create packages for you. However, you can also download a program’s source code and compile it yourself. You shouldn’t normally need to do this on Ubuntu. Most experimental software you might want is probably in a PPA, where someone’s already done the hard work for you.

特定软件的开发人员通常以源代码形式发布软件。 Linux发行版采用源代码,对其进行编译,并为您创建软件包。 但是,您也可以下载程序的源代码并自己进行编译 。 您通常不需要在Ubuntu上执行此操作。 您可能想要的大多数实验性软件可能都在PPA中,那里有人已经为您完成了艰苦的工作。

On other distributions, it may occasionally be necessary to compile a program to get the latest version you need or install a program that isn’t available in your repositories. However, the average Linux user — and even many geeky Linux users — will never have to compile something from source.

在其他发行版中,有时可能需要编译程序以获得所需的最新版本或安装存储库中不可用的程序。 但是,普通的Linux用户-甚至许多令人讨厌的Linux用户-都不必从源代码进行编译。

Source code files are generally distributed in .tar.gz format, but that’s just a type of archive — .tar.gz files could contain anything, just like .zip files can.

源代码文件通常以.tar.gz格式分发,但这只是一种存档-.tar.gz文件可以包含任何内容,就像.zip文件一样。

二进制程序 (Binary Programs)

Some programs are distributed in binary form, not source code form. This may be because the program is closed-source and the program’s distributer doesn’t want to do the hard work of packaging it for various distributions.

有些程序以二进制形式而不是源代码形式分发。 这可能是因为该程序是开源的,并且该程序的发行者不想为各种发行版进行繁琐的打包工作。

For example, Mozilla offers Linux downloads of Firefox binaries in .tar.bz2 format. (.tar.bz2 is just another archive format, like a zip file.) You can download this archive, extract it to a folder on your computer, and run the run-mozilla.sh script inside it (just double-click it) to run the downloaded Firefox binary.

例如, Mozilla提供Linux下载的 .tar.bz2格式的Firefox二进制文件 。 (.tar.bz2只是另一个存档格式,如zip文件。)您可以下载此存档,将其解压缩到计算机上的文件夹中,然后在其中运行run-mozilla.sh脚本(只需双击即可)。运行下载的Firefox二进制文件。

However, you shouldn’t do this in the case of Firefox. Use the Firefox package that comes with your operating system — it’s probably better optimized, faster, and will update through your standard package management tools. Still, if you’re using an older distribution of Linux that comes with an outdated Firefox, you can download the Firefox binary to your computer and run it from a directory without needing any system-wide permissions to install it.

但是,对于Firefox,您不应该这样做。 使用操作系统随附的Firefox软件包-可能会得到更好的优化,更快的速度,并将通过您的标准软件包管理工具进行更新。 不过,如果您使用的是较旧的Firefox附带的Linux发行版,则可以将Firefox二进制文件下载到计算机上并从目录运行它,而无需任何系统级权限来安装它。

firefox-binary-package-for-linux

Much closed-source software (particularly older, unsupported closed-source software) is distributed in unpackaged binary form. Software like the Linux ports of Doom 3, Quake 4, Unreal Tournament 2004, and Neverwinter Nights are distributed in binary packages and even have Windows-like installers. These installers are actually just programs that extract the game’s files to a folder and create application menu shortcuts.

许多封闭源软件(尤其是较旧的不受支持的封闭源软件)以未打包的二进制形式分发。 像《毁灭战士3》,《雷神之锤4》,《虚幻竞技场2004》和《无冬之夜》的Linux端口之类的软件以二进制软件包分发,甚至具有类似于Windows的安装程序。 这些安装程序实际上只是将游戏文件提取到文件夹并创建应用程序菜单快捷方式的程序。

ut2004-installer-for-linux


Of course, there are other ways to install software on Ubuntu. The Zero Install (also known as 0install) project has been trying to change Linux software installation for over five years, creating a system for installing desktop software that works across all Linux distributions. However, the Zero Install project hasn’t gained much traction. Most Linux users are well-served by their Linux distribution’s package manager — particularly if they’re using Ubuntu, which most software is packaged for.

当然,还有其他方法可以在Ubuntu上安装软件。 零安装(也称为0install)项目已经尝试更改Linux软件安装超过五年了,创建了一个用于安装适用于所有Linux发行版的桌面软件的系统。 但是,“零安装”项目并没有吸引太多人。 大多数Linux用户都可以通过其Linux发行版的软件包管理器得到很好的服务-特别是如果他们使用的是Ubuntu(大多数软件都打包了该软件包)。

翻译自: https://www.howtogeek.com/142414/how-to-install-software-from-outside-ubuntus-software-repositories/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值