mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
commit
e8e89a9b4f
@ -1,3 +1,5 @@
|
|||||||
|
zhs852 is translating.
|
||||||
|
|
||||||
Dawn of the Microcomputer: The Altair 8800
|
Dawn of the Microcomputer: The Altair 8800
|
||||||
======
|
======
|
||||||
Subscribers to Popular Electronics were a sophisticated group. The magazine’s editor, Arthur Salsberg, felt compelled to point out as much in the editorial section of the [December 1974 issue][1]. The magazine had received letters complaining that a recent article, titled “How to Set Up a Home TV Service Shop,” would inspire a horde of amateur TV technicians to go out and undercut professional repairmen, doing great damage to everyone’s TVs in the process. Salsberg thought this concern was based on a misunderstanding about who read Popular Electronics. He explained that, according to the magazine’s own surveys, 52% of Popular Electronics subscribers were electronics professionals of some kind and 150,000 of them had repaired a TV in the last 60 days. Moreover, the average Popular Electronics subscriber had spent $470 on electronics equipment ($3578 in 2018) and possessed such necessities as VOMs, VTVMs, tube testers, transistor testers, r-f signal generators, and scopes. “Popular Electronics readers are not largely neophytes,” Salsberg concluded.
|
Subscribers to Popular Electronics were a sophisticated group. The magazine’s editor, Arthur Salsberg, felt compelled to point out as much in the editorial section of the [December 1974 issue][1]. The magazine had received letters complaining that a recent article, titled “How to Set Up a Home TV Service Shop,” would inspire a horde of amateur TV technicians to go out and undercut professional repairmen, doing great damage to everyone’s TVs in the process. Salsberg thought this concern was based on a misunderstanding about who read Popular Electronics. He explained that, according to the magazine’s own surveys, 52% of Popular Electronics subscribers were electronics professionals of some kind and 150,000 of them had repaired a TV in the last 60 days. Moreover, the average Popular Electronics subscriber had spent $470 on electronics equipment ($3578 in 2018) and possessed such necessities as VOMs, VTVMs, tube testers, transistor testers, r-f signal generators, and scopes. “Popular Electronics readers are not largely neophytes,” Salsberg concluded.
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
translated by lixinyuxx
|
|
||||||
4 Firefox extensions worth checking out
|
|
||||||
======
|
|
||||||
|
|
||||||
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/firefox_blue_lead.jpg?itok=gYaubJUv)
|
|
||||||
|
|
||||||
I've been a Firefox user since v2.0 came out about 12 years ago. There were times when it wasn't the best web browser out there, but still, I kept going back to it for one reason: My favorite extensions wouldn't work with anything else.
|
|
||||||
|
|
||||||
Today, I like the current state of Firefox itself for being fast, customizable, and open source, but I also appreciate extensions for manifesting ideas the original developers never thought of: What if you want to browse without a mouse? What if you don't like staring at bright light coming out of the monitor at night? What about using a dedicated media player for YouTube and other video hosting websites for better performance and extended playback controls? And what if you need a more sophisticated way to disable trackers and speed up loading pages?
|
|
||||||
|
|
||||||
Fortunately, there's an answer for each of these questions, and I'm going to give them to you in the form of my favorite extensions—all of which are free software or open source (i.e., distributed under the [GNU GPL][1], [MPL][2], or [Apache][3] license) and make an excellent browser even better.
|
|
||||||
|
|
||||||
Although the terms add-on and extension have slightly different meanings, I'll use them interchangeably in this article.
|
|
||||||
|
|
||||||
### Tridactyl
|
|
||||||
|
|
||||||
![Tridactyl screenshot][5]
|
|
||||||
|
|
||||||
Tridactyl's new tab page, showcasing link hinting.
|
|
||||||
|
|
||||||
[Tridactyl][6] enables you to use your keyboard for most of your browsing activities. It's inspired by the now-defunct [Vimperator][7] and [Pentadactyl][8], which were inspired by the default keybindings of [Vim][9]. Since I'm already used to Vim and other command-line applications, I find features like being able to navigate with the keys `h/j/k/l`, interact with hyperlinks with `f/F`, and create custom keybindings and commands very convenient.
|
|
||||||
|
|
||||||
Tridactyl's optional native messenger (for now, available only for GNU/Linux and Mac OSX), which was implemented recently, offers even more cool features to boot. With it, for example, you can hide some elements of the GUI of Firefox (à la Vimperator and Pentadactyl), open a link or the current page in an external program (I often use [mpv][10] and [youtube-dl][11] for videos) and edit the content of text areas with your favorite text editor by pressing `Ctrl-I` (or any key combination of your choice).
|
|
||||||
|
|
||||||
Having said that, keep in mind that it's a relatively young project and may still be rough around the edges. On the other hand, its development is very active, and when you look past its childhood illnesses, it can be a pleasure to use.
|
|
||||||
|
|
||||||
### Open With
|
|
||||||
|
|
||||||
![Open With Screenshot][13]
|
|
||||||
|
|
||||||
A context menu provided by Open With. I can open the current page with one of the external programs listed here.
|
|
||||||
|
|
||||||
Speaking of interaction with external programs, sometimes it's nice to have the ability to do that with the mouse. That's where [Open With][14] comes in.
|
|
||||||
|
|
||||||
Apart from the added context menu (shown in the screenshot), you can find your own defined commands by clicking on the extension's icon on the add-on bar. As its icon and the description on [its page on Mozilla Add-ons][14] suggest, it was primarily intended to work with other web browsers, but I can use it with mpv and youtube-dl with ease as well.
|
|
||||||
|
|
||||||
Keyboard shortcuts are available here, too, but they're severely limited. There are no more than three different combinations that can be selected in a drop-down list in the extension's settings. In contrast, Tridactyl lets me assign commands to virtually anything that isn't blocked by Firefox. Open With is currently for the mouse, really.
|
|
||||||
|
|
||||||
### Stylus
|
|
||||||
|
|
||||||
![Stylus Screenshot][16]
|
|
||||||
|
|
||||||
In this screenshot, I've just searched for and installed a dark theme for the site I'm currently on with Stylus. Even the popup has custom style (called Deepdark Stylus)!
|
|
||||||
|
|
||||||
[Stylus][17] is a userstyle manager, which means that by writing custom CSS rules and loading them with Stylus, you can change the appearance of any webpage. If you don't know CSS, there are a plethora of userstyles made by others on websites such as [userstyles.org][18].
|
|
||||||
|
|
||||||
Now, you may be asking, "Isn't that exactly what [Stylish][19] does?" You would be correct! You see, Stylus is based on Stylish and provides additional improvements: It respects your privacy by not containing any telemetry, all development is done in the open (although Stylish is still actively developed, I haven't been able to find the source code for recent versions), and it supports [UserCSS][20], among other things.
|
|
||||||
|
|
||||||
UserCSS is an interesting format, especially for developers. I've written several userstyles for various websites (mainly dark themes and tweaks for better readability), and while the internal editor of Stylus is excellent, I still prefer editing code with Neovim. For that, all I need to do is load a local file with its name ending with ".user.css" in Stylus, enable the option "Live Reload", and any changes will be applied as soon as I modify and save that file in Neovim. Remote UserCSS files are also supported, so whenever I push changes to GitHub or any git-based development platforms, they'll automatically become available for users. (I provide a link to the raw version of the file so that they can access it easily.)
|
|
||||||
|
|
||||||
### uMatrix
|
|
||||||
|
|
||||||
![uMatrix Screenshot][22]
|
|
||||||
|
|
||||||
The user interface of uMatrix, showing the current rules for the currently visited webpage.
|
|
||||||
|
|
||||||
Jeremy Garcia mentioned uBlock Origin in [his article][23] here on Opensource.com as an excellent blocker. I'd like to draw attention to another extension made by [gorhill][24]: uMatrix.
|
|
||||||
|
|
||||||
[uMatrix][25] allows you to set blocking rules for certain requests on a webpage, which can be toggled by clicking on the add-on's popup (seen in the screenshot above). These requests are distinguished by the categories of scripts, requests made by scripts, cookies, CSS rules, images, media content, frames, and anything else labeled as "other" by uMatrix. You can set up global rules to, for instance, allow all requests by default and add only particular ones to the blacklist (the more convenient approach), or block everything by default and whitelist certain requests manually (the safer approach). If you've been using NoScript or RequestPolicy, you can [import][26] your whitelist rules from them, too.
|
|
||||||
|
|
||||||
In addition, uMatrix supports [hosts files][27], which can be used to block requests from certain domains. These are not to be confused with the filter lists used by uBlock Origin, which use the same syntax as the filters set by Adblock Plus. By default, uMatrix blocks domains of servers known to distribute ads, trackers, and malware with the help of a few hosts files, and you can add more external sources if you want to.
|
|
||||||
|
|
||||||
So which one shall you choose—uBlock Origin or uMatrix? Personally, I use both on my desktop PC and only uMatrix on my Android phone. There's some overlap between the two, [according to gorhill][28], but they have a different target userbase and goals. If all you want is an easy way to block trackers and ads, uBlock Origin is a better choice. On the other hand, if you want granular control over what a webpage can or can't do inside your browser, even if it takes some time to configure and it can prevent sites from functioning as intended, uMatrix is the way to go.
|
|
||||||
|
|
||||||
### Conclusion
|
|
||||||
|
|
||||||
Currently, these are my favorite extensions for Firefox. Tridactyl is for speeding up browsing navigation by relying on the keyboard and interacting with external programs; Open With is there if I need to open something in another program with the mouse; Stylus is the definitive userstyle manager, appealing to both users and developers alike; and uMatrix is essentially a firewall within Firefox for filtering out requests on unknown territories.
|
|
||||||
|
|
||||||
Even though I almost exclusively discussed the benefits of these add-ons, no software is ever perfect. If you like any of them and think they can be improved in any way, I recommend that you go to their GitHub page and look for their contribution guides. Usually, developers of free and open source software welcome bug reports and pull requests. Telling your friends about them or saying thanks are also excellent ways to help the developers, especially if they work on their projects in their spare time.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://opensource.com/article/18/6/firefox-open-source-extensions
|
|
||||||
|
|
||||||
作者:[Zsolt Szakács][a]
|
|
||||||
选题:[lujun9972](https://github.com/lujun9972)
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]:https://opensource.com/users/zsolt
|
|
||||||
[1]:https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
||||||
[2]:https://www.mozilla.org/en-US/MPL/
|
|
||||||
[3]:https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
[4]:/file/398411
|
|
||||||
[5]:https://opensource.com/sites/default/files/uploads/tridactyl.png (Tridactyl's new tab page, showcasing link hinting)
|
|
||||||
[6]:https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/
|
|
||||||
[7]:https://github.com/vimperator/vimperator-labs
|
|
||||||
[8]:https://addons.mozilla.org/en-US/firefox/addon/pentadactyl/
|
|
||||||
[9]:https://www.vim.org/
|
|
||||||
[10]:https://mpv.io/
|
|
||||||
[11]:https://rg3.github.io/youtube-dl/index.html
|
|
||||||
[12]:/file/398416
|
|
||||||
[13]:https://opensource.com/sites/default/files/uploads/openwith.png (A context menu provided by Open With. I can open the current page with one of the external programs listed here.)
|
|
||||||
[14]:https://addons.mozilla.org/en-US/firefox/addon/open-with/
|
|
||||||
[15]:/file/398421
|
|
||||||
[16]:https://opensource.com/sites/default/files/uploads/stylus.png (In this screenshot, I've just searched for and installed a dark theme for the site I'm currently on with Stylus. Even the popup has custom style (called Deepdark Stylus)!)
|
|
||||||
[17]:https://addons.mozilla.org/en-US/firefox/addon/styl-us/
|
|
||||||
[18]:https://userstyles.org/
|
|
||||||
[19]:https://addons.mozilla.org/en-US/firefox/addon/stylish/
|
|
||||||
[20]:https://github.com/openstyles/stylus/wiki/Usercss
|
|
||||||
[21]:/file/398426
|
|
||||||
[22]:https://opensource.com/sites/default/files/uploads/umatrix.png (The user interface of uMatrix, showing the current rules for the currently visited webpage.)
|
|
||||||
[23]:https://opensource.com/article/18/5/firefox-extensions
|
|
||||||
[24]:https://addons.mozilla.org/en-US/firefox/user/gorhill/
|
|
||||||
[25]:https://addons.mozilla.org/en-US/firefox/addon/umatrix
|
|
||||||
[26]:https://github.com/gorhill/uMatrix/wiki/FAQ
|
|
||||||
[27]:https://en.wikipedia.org/wiki/Hosts_(file)
|
|
||||||
[28]:https://github.com/gorhill/uMatrix/issues/32#issuecomment-61372436
|
|
@ -1,315 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (jlztan)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (What is PPA? Everything You Need to Know About PPA in Linux)
|
|
||||||
[#]: via: (https://itsfoss.com/ppa-guide/)
|
|
||||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
|
||||||
|
|
||||||
What is PPA? Everything You Need to Know About PPA in Linux
|
|
||||||
======
|
|
||||||
|
|
||||||
**Brief: An in-depth article that covers almost all the questions around using PPA in Ubuntu and other Linux distributions.**
|
|
||||||
|
|
||||||
If you have been using Ubuntu or some other Linux distribution based on Ubuntu such as Linux Mint, Linux Lite, Zorin OS etc, you may have come across three magical lines of this sort:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo add-apt-repository ppa:dr-akulavich/lighttable
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install lighttable-installer
|
|
||||||
```
|
|
||||||
|
|
||||||
A number of websites suggest these kind of lines to [install applications in Ubuntu][1]. This is what is called installing an application using PPA.
|
|
||||||
|
|
||||||
But what is PPA? Why is it used? Is it safe to use PPA? How to properly use PPA? How to delete a PPA?
|
|
||||||
|
|
||||||
I’ll answer all of the above questions in this detailed guide. Even if you already know a few things about PPAs, I am sure this article will still add to your knowledge.
|
|
||||||
|
|
||||||
Do note that I am writing this article using Ubuntu. Therefore I’ll use the term Ubuntu almost everywhere but the explanations and steps are also applicable to other Debian/Ubuntu based distributions.
|
|
||||||
|
|
||||||
### What is PPA? Why is it used?
|
|
||||||
|
|
||||||
![Everything you need to know about PPA in Ubuntu Linux][2]
|
|
||||||
|
|
||||||
PPA stands for Personal Package Archive.
|
|
||||||
|
|
||||||
Does that make sense? Probably not.
|
|
||||||
|
|
||||||
Before you understand PPA, you should know the concept of repositories in Linux. I won’t go into details here though.
|
|
||||||
|
|
||||||
#### Concept of repositories and package management
|
|
||||||
|
|
||||||
A repository is a collection of files that has information about various software, their versions and some other details like the checksum. Each Ubuntu version has its own official set of four repositories:
|
|
||||||
|
|
||||||
* **Main** – Canonical-supported free and open-source software.
|
|
||||||
|
|
||||||
* **Universe** – Community-maintained free and open-source software.
|
|
||||||
|
|
||||||
* **Restricted** – Proprietary drivers for devices.
|
|
||||||
|
|
||||||
* **Multiverse** – Software restricted by copyright or legal issues.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
You can see such repositories for all Ubuntu versions [here][3]. You can browse through them and also go to the individual repositories. For example, Ubuntu 16.04 main repository can be found [here][4].
|
|
||||||
|
|
||||||
So basically it’s a web URL that has information about the software. How does your system know where are these repositories?
|
|
||||||
|
|
||||||
This information is stored in the sources.list file in the directory /etc/apt. If you look at its content, you’ll see that it has the URL of the repositories. The lines with # at the beginning are ignored.
|
|
||||||
|
|
||||||
Now when you run the command sudo apt update, your system uses [APT tool][5] to check against the repo and stores the information about the software and their version in a cache. When you use the command sudo apt install package_name, it uses the information to get that package from the URL where the actual software is stored.
|
|
||||||
|
|
||||||
If the repository doesn’t have the information about a certain package, you’ll see an error like:
|
|
||||||
|
|
||||||
```
|
|
||||||
E: Unable to locate package
|
|
||||||
```
|
|
||||||
|
|
||||||
At this point, I recommend reading my [guide to using apt commands][6]. This will give you a much better understanding of apt commands, update etc.
|
|
||||||
|
|
||||||
So this was about repositories. But what is PPA? How does it enter into the picture?
|
|
||||||
|
|
||||||
#### Why is PPA used?
|
|
||||||
|
|
||||||
As you can see, Ubuntu controls what software and more importantly which version of a software you get on your system. But imagine if a software developer releases a new version of the software.
|
|
||||||
|
|
||||||
Ubuntu won’t make it available immediately. There is a procedure to check if the new version of the software is compatible with the system or not. This ensures the stability of the system.
|
|
||||||
|
|
||||||
But this also means that it will be some weeks or in some cases, some months before it is made available by Ubuntu. Not everyone would want to wait that long to get their hands on the new version of their favorite software.
|
|
||||||
|
|
||||||
Similarly, suppose someone develops a software and wants Ubuntu to include that software in the official repositories. It again will take months before Ubuntu makes a decision and includes it in the official repositories.
|
|
||||||
|
|
||||||
Another case would be during beta testing. Even if a stable version of the software is available in the official repositories, a software developer may want some end users to test their upcoming release. How do they enable the end user to beta test the upcoming release?
|
|
||||||
|
|
||||||
Enter PPA!
|
|
||||||
|
|
||||||
### How to use PPA? How does PPA work?
|
|
||||||
|
|
||||||
[PPA][7], as I already told you, means Personal Package Archive. Mind the word ‘Personal’ here. That gives the hint that this is something exclusive to a developer and is not officially endorsed by the distribution.
|
|
||||||
|
|
||||||
Ubuntu provides a platform called Launchpad that enables software developers to create their own repositories. An end user i.e. you can add the PPA repository to your sources.list and when you update your system, your system would know about the availability of this new software and you can install it using the standard sudo apt install command like this.
|
|
||||||
|
|
||||||
`sudo add-apt-repository ppa:dr-akulavich/lighttable`
|
|
||||||
`sudo apt-get update`
|
|
||||||
`sudo apt-get install lighttable-installer`
|
|
||||||
|
|
||||||
To summarize:
|
|
||||||
|
|
||||||
* sudo add-apt-repository <PPA_info> <– This command adds the PPA repository to the list.
|
|
||||||
* sudo apt-get update <– This command updates the list of the packages that can be installed on the system.
|
|
||||||
* sudo apt-get install <package_in_PPA> <– This command installs the package.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
You see that it is important to use the command sudo apt update or else your system will not know when a new package is available.
|
|
||||||
|
|
||||||
Now let’s take a look at the first command in a bit more detail.
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo add-apt-repository ppa:dr-akulavich/lighttable
|
|
||||||
```
|
|
||||||
|
|
||||||
You would notice that this command doesn’t have a URL to the repository. This is because the tool has been designed to abstract the information about URL from you.
|
|
||||||
|
|
||||||
Just a small note. If you add ppa:dr-akulavich/lighttable, you get Light Table. But if you add ppa:dr-akulavich, you’ll get all the repository or packages mentioned in the ‘upper repository’. It’s hierarchical.
|
|
||||||
|
|
||||||
Basically, when you add a PPA using add-apt-repository, it will do the same action as if you manually run these commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
deb http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main
|
|
||||||
deb-src http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main
|
|
||||||
```
|
|
||||||
|
|
||||||
The above two lines are the traditional way to add any repositories to your sources.list. But PPA does it automatically for you, without wondering about the exact repository URL and operating system version.
|
|
||||||
|
|
||||||
One important thing to not here is that when you use PPA, it doesn’t change your original sources.list. Instead, it creates two files in /etc/apt/sources.d directory, a list and a back up file with suffix ‘save’.
|
|
||||||
|
|
||||||
![Using a PPA in Ubuntu][8]PPA create separate sources.list
|
|
||||||
|
|
||||||
The files with suffix ‘list’ has the command that adds the information about the repository.
|
|
||||||
|
|
||||||
![PPA add repository information][9]Content of source.list of a PPA
|
|
||||||
|
|
||||||
This is a safety measure to ensure that adding PPAs don’t mess with the original sources.list. It also helps in removing the PPA.
|
|
||||||
|
|
||||||
#### Why PPA? Why not DEB packages?
|
|
||||||
|
|
||||||
You may ask why should you use PPA when it involves using command line which might not be preferred by everyone. Why not just distribute a DEB package that can be installed graphically?
|
|
||||||
|
|
||||||
The answer lies in the update procedure. If you install a software using a DEB package, there is no guarantee that the installed software will be updated to a newer version when you run sudo apt update && sudo apt upgrade.
|
|
||||||
|
|
||||||
It’s because the apt upgrade procedure relies on the sources.list. If there is no entry for a software, it doesn’t get the update via the standard software updater.
|
|
||||||
|
|
||||||
So does it mean software installed using DEB never gets an update? No, not really. It depends on how the package was created.
|
|
||||||
|
|
||||||
Some developers automatically add an entry to the sources.list and then it is updated like a regular software. Google Chrome is one such example.
|
|
||||||
|
|
||||||
Some software would notify you of availability of a new version when you try to run it. You’ll have to download the new DEB package and run it again to update the current software to a newer version. Oracle Virtual Box is an example in this case.
|
|
||||||
|
|
||||||
For the rest of the DEB packages, you’ll have to manually look for an update and this is not convenient, especially if your software is meant for beta testers. You need to add more updates frequently. This is where PPA come to the rescue.
|
|
||||||
|
|
||||||
#### Offical PPA vs unofficial PPA
|
|
||||||
|
|
||||||
You may also hear the term official PPA or unofficial PPA. What’s the difference?
|
|
||||||
|
|
||||||
When developers create PPA for their software, it is called the official PPA. Quite obviously because it is coming from none other than the project developers.
|
|
||||||
|
|
||||||
But at times, individuals create PPA of projects that were created by other developers.
|
|
||||||
|
|
||||||
Why would someone do that? Because many developers just provide the source code of the software and you know that [installing software from source code in Linux][10] is a pain and not everyone could or would do that.
|
|
||||||
|
|
||||||
This is why volunteers take it upon themselves to create a PPA from those source code so that other users can install the software easily. After all, using those 3 lines is a lot easier than battling the source code installation.
|
|
||||||
|
|
||||||
#### Make sure that a PPA is available for your distribution version
|
|
||||||
|
|
||||||
When it comes to using PPA in Ubuntu or any other Debian based distribution, there are a few things you should keep in mind.
|
|
||||||
|
|
||||||
Not every PPA is available for your particular version. You should know [which Ubuntu version][11] you are using. The codename of the release is important because when you go to the webpage of a certain PPA, you can see which Ubuntu versions are supported by the PPA.
|
|
||||||
|
|
||||||
For other Ubuntu-based distributions, you can check the content of /etc/os-release to [find out the Ubuntu version][11] information.
|
|
||||||
|
|
||||||
![Verify PPA availability for Ubuntu version][12]Check if PPA is available for your Ubuntu version
|
|
||||||
|
|
||||||
How to know the PPA url? Simply search on the internet with the PPA name like ppa:dr-akulavich/lighttable and you’ll get the first result from [Launchpad][13], the official platform for hosting PPA. You can also go to Launchpad and search for the required PPA directly there.
|
|
||||||
|
|
||||||
If you don’t verify and add the PPA, you may see an error like this when you try to install a software not available for your version.
|
|
||||||
|
|
||||||
```
|
|
||||||
E: Unable to locate package
|
|
||||||
```
|
|
||||||
|
|
||||||
What’s worse is that since it has been added to your source.list, each time you run software updater, you’ll see an error “[Failed to download repository information][14]“.
|
|
||||||
|
|
||||||
![Failed to download repository information Ubuntu 13.04][15]
|
|
||||||
|
|
||||||
If you run sudo apt update in the terminal, the error will have more details about which repository is causing the trouble. You can see something like this in the end of the output of sudo apt update:
|
|
||||||
|
|
||||||
```
|
|
||||||
W: Failed to fetch http://ppa.launchpad.net/venerix/pkg/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found
|
|
||||||
E: Some index files failed to download. They have been ignored, or old ones used instead.
|
|
||||||
```
|
|
||||||
|
|
||||||
Which is self-explanatory because the system cannot find the repository for your version. Remember what we saw earlier about repository structure? APT will try to look for software information in the place <http://ppa.launchpad.net/\><PPA_NAME>/ubuntu/dists/Ubuntu_Version
|
|
||||||
|
|
||||||
And if the PPA for the specific version is not available, it will never be able to open the URL and you get the famous 404 error.
|
|
||||||
|
|
||||||
#### Why are PPAs not available for all the Ubuntu release versions?
|
|
||||||
|
|
||||||
It is because someone has to compile the software and create a PPA out of it on the specific versions. Considering that a new Ubuntu version is released every six months, it’s a tiresome task to update the PPA for every Ubuntu release. Not all developers have time to do that.
|
|
||||||
|
|
||||||
#### How to install the application if PPA is not available for your version?
|
|
||||||
|
|
||||||
It is possible that though the PPA is not available for your Ubuntu version, you could still download the DEB file and install the application
|
|
||||||
|
|
||||||
Let’s say that you go to the Light Table PPA. Using the knowledge about PPA you just learned, you realize that the PPA is not available for your specific Ubuntu release.
|
|
||||||
|
|
||||||
What you can do is to click on the ‘View package details’.
|
|
||||||
|
|
||||||
![Get DEB file from PPA][16]
|
|
||||||
|
|
||||||
And in here, you can click on a package to reveal more details. You’ll also find the source code and the DEB file of the package here.
|
|
||||||
|
|
||||||
![Download DEB file from PPA][17]
|
|
||||||
|
|
||||||
I advise [using Gdebi to install these DEB files][18] instead of the Software Center because Gdebi is a lot better at handling dependencies.
|
|
||||||
|
|
||||||
Do note that the package installed this way might not get any future updates.
|
|
||||||
|
|
||||||
I think you have read enough about adding PPAs. How about removing a PPA and the software installed by it?
|
|
||||||
|
|
||||||
### How to delete PPA?
|
|
||||||
|
|
||||||
I have written about [deleting PPA][19] in the past. I am going to describe the same methods here as well.
|
|
||||||
|
|
||||||
I advise deleting the software that you installed from a PPA before removing the PPA. If you just remove the PPA, the installed software remains in the system but it won’t get any updates. You wouldn’t want that, would you?
|
|
||||||
|
|
||||||
So, the question comes, how to know which application was installed by which PPA?
|
|
||||||
|
|
||||||
#### Find packages installed by a PPA and remove them
|
|
||||||
|
|
||||||
Ubuntu Software Center doesn’t help here. You’ll have to use Synaptic package manager here which has more advanced features.
|
|
||||||
|
|
||||||
You can install Synaptic from Software Center or use the command below:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install synaptic
|
|
||||||
```
|
|
||||||
|
|
||||||
Once installed, start Synaptic package manager and select Origin. You’ll see various repositories added to the system. PPA entries will be labeled with prefix PPA. Click on them to see the packages that are available by the PPA. Installed software will have appropriate symbol before it.
|
|
||||||
|
|
||||||
![Managing PPA with Synaptic package manager][20]Find packages installed via a PPA
|
|
||||||
|
|
||||||
Once you have found the packages, you can delete them from Synaptic itself. Otherwise, you always have the option to use the command line:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt remove package_name
|
|
||||||
```
|
|
||||||
|
|
||||||
Once you have removed the packages installed by a PPA, you can continue to remove the PPA from your sources.list.
|
|
||||||
|
|
||||||
#### Remove a PPA graphically
|
|
||||||
|
|
||||||
Go to Software & Updates and then go to tab Other Software. Look for the PPA that you want to remove:
|
|
||||||
|
|
||||||
![Delete a PPA from Software Source][21]
|
|
||||||
|
|
||||||
You have two options here. Either you deselect the PPA or you choose the Remove option.
|
|
||||||
|
|
||||||
The difference is that when you deselect a PPA entry, your system will comment out the repository entry in its ppa_name.list file in /etc/apt/sources.list.d but if you choose the Remove option, it will delete the repository entry from its ppa_name.list file in /etc/apt/sources.list.d directory.
|
|
||||||
|
|
||||||
In both the cases, the files ppa_name.list remains in the said directory, even if it is empty.
|
|
||||||
|
|
||||||
### Is it safe to use PPA?
|
|
||||||
|
|
||||||
It is a subjective question. Purists abhor PPA because most of the time PPAs are from third-party developers. But at the same time, PPAs are popular in the Debian/Ubuntu world as they provide an easier installation option.
|
|
||||||
|
|
||||||
As far as the security is concerned, it’s less likely that you use a PPA and your Linux system is hacked or injected with malware. I don’t recall such an incident ever happened so far.
|
|
||||||
|
|
||||||
Official PPAs can be used without thinking twice. Using unofficial PPA is entirely your decision.
|
|
||||||
|
|
||||||
As a rule of thumb, you should avoid installing a program via a third party PPA if it the program requires sudo access to run.
|
|
||||||
|
|
||||||
### What do you think about using PPA?
|
|
||||||
|
|
||||||
I know it’s a long read but I wanted to give you a better understanding of PPA. I hope this detailed guide answered most of your questions about using PPA.
|
|
||||||
|
|
||||||
If you have more questions about PPA, please feel free to ask in the comment section.
|
|
||||||
|
|
||||||
If you notice any technical or grammatical error or if you have suggestions for improving this article, please let me know.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/ppa-guide/
|
|
||||||
|
|
||||||
作者:[Abhishek Prakash][a]
|
|
||||||
选题:[lujun9972][b]
|
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|
||||||
|
|
||||||
[a]: https://itsfoss.com/author/abhishek/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://itsfoss.com/remove-install-software-ubuntu/
|
|
||||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/what-is-ppa.png?resize=800%2C450&ssl=1
|
|
||||||
[3]: http://archive.ubuntu.com/ubuntu/dists/
|
|
||||||
[4]: http://archive.ubuntu.com/ubuntu/dists/xenial/main/
|
|
||||||
[5]: https://wiki.debian.org/Apt
|
|
||||||
[6]: https://itsfoss.com/apt-command-guide/
|
|
||||||
[7]: https://launchpad.net/ubuntu/+ppas
|
|
||||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/01/ppa-sources-list-files.png?resize=800%2C259&ssl=1
|
|
||||||
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/01/content-of-ppa-list.png?ssl=1
|
|
||||||
[10]: https://itsfoss.com/install-software-from-source-code/
|
|
||||||
[11]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
|
||||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/12/verify-ppa-availibility-version.jpg?resize=800%2C481&ssl=1
|
|
||||||
[13]: https://launchpad.net/
|
|
||||||
[14]: https://itsfoss.com/failed-to-download-repository-information-ubuntu-13-04/
|
|
||||||
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2013/04/Failed-to-download-repository-information-Ubuntu-13.04.png?ssl=1
|
|
||||||
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/deb-from-ppa.jpg?resize=800%2C483&ssl=1
|
|
||||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/deb-from-ppa-2.jpg?resize=800%2C477&ssl=1
|
|
||||||
[18]: https://itsfoss.com/gdebi-default-ubuntu-software-center/
|
|
||||||
[19]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
|
|
||||||
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/01/ppa-synaptic-manager.jpeg?resize=800%2C394&ssl=1
|
|
||||||
[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2012/08/Delete-a-PPA.jpeg?ssl=1
|
|
@ -0,0 +1,109 @@
|
|||||||
|
4个值得一提的 Firefox 拓展插件
|
||||||
|
======
|
||||||
|
|
||||||
|
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/firefox_blue_lead.jpg?itok=gYaubJUv)
|
||||||
|
|
||||||
|
自从大约12年前 V2.0 推出以来, 我一直是 Firefox (火狐浏览器)的用户。那时它不是最好的网络浏览器,但我仍旧因为一个理由使用它:我最喜爱的无可比拟的浏览器拓展插件
|
||||||
|
|
||||||
|
如今, 我喜欢 Firefox 的当前状态,因为它快速、可定制和开源,但我也很欣赏扩展插件来体现原开发人员从未想到的特点: 如果您想在没有鼠标的情况下浏览呢?如果您不喜欢盯着晚上从显示器里出来的强光呢?对于 YouTube 和其他视频托管网站为了更好的性能和扩展使用一个更专业的播放器又如何呢?如果您需要更复杂的方法来禁用跟踪器和加快加载页面, 该怎么办?
|
||||||
|
|
||||||
|
幸运的是, 这些问题都有答案, 我将展现给你我最喜爱的拓展--所有这些都是免费软件或开源的 (即, 在 [GNU GPL][1], [MPL][2],或 [Apache][3] 许可下) 并使一个优秀的浏览器更好。
|
||||||
|
|
||||||
|
尽管术语加载项和扩展具有微微不同的含义,,但我将在本文中交替使用它们。
|
||||||
|
|
||||||
|
### Tridactyl
|
||||||
|
|
||||||
|
![Tridactyl screenshot][5]
|
||||||
|
|
||||||
|
Tridactyl 的新选项卡页面,展示隐藏连接。
|
||||||
|
|
||||||
|
[Tridactyl][6] 使您能够在大多数浏览活动中使用键盘。它的灵感来自于现已解散的 [Vimperator][7] 和 [Pentadactyl][8] ,这是由 [Vim][9] 默认绑定值启发的。由于我已经习惯了 Vim 和其他命令行应用程序,我发现了一些功能,比如能够使用键值 `h/j/k/l` 进行导航,用 `f/F` 与超链接进行交互,并创建非常方便的自定义键绑定和命令。
|
||||||
|
|
||||||
|
Tridactyl 的可选本地信代理(目前,仅适用于GNU/Linux 和 Mac OSX), 最近才实现的,提供了更酷的功能来启动。例如, 有了它, 您可以隐藏 Firefox GUI 的一些元素(à la Vimperator 和 Pentadactyl),在外部程序中打开链接或当前页 (我经常用 [mpv][10] 和 [youtube-dl][11] 在视频上)通过按 `Ctrl-I` 用您喜爱的编辑器编辑文本内容(或者任意您选择的组合键)。
|
||||||
|
|
||||||
|
话虽如此, 但要记住,这是一个相对早期的项目,细节可能还是很粗糙。 另一方面,它的发展非常活跃, 当你回顾它早期的缺陷时, 使用它可能是一种乐趣。
|
||||||
|
|
||||||
|
### Open With
|
||||||
|
|
||||||
|
![Open With Screenshot][13]
|
||||||
|
|
||||||
|
Open With 提供的菜单。我可以在当前页面打开一个额外的列表。
|
||||||
|
|
||||||
|
说到与外部程序的互动,有时很高兴有能力用鼠标来做到这一点。这是 [Open With][14] 想法的来源.
|
||||||
|
|
||||||
|
除了添加的上下文菜单 (如屏幕截图所示) 外,您还可以通过单击加载项栏上的扩展图标来找到自己定义的命令。 [its page on Mozilla Add-ons][14] 建议作为它的图标和描述,它主要是为了与其他 web 浏览器一起工作, 但我也可以轻松地使用它与 mpv 和 youtube-dl 。
|
||||||
|
|
||||||
|
这里也提供键盘快捷方式,但它们受到严重限制。可以在扩展设置的下拉列表中选择的组合不超过三种。相反, Tridactyl 允许我将命令分配给几乎任何没有被 Firefox 阻止的东西。打开与是目前为鼠标,真的。
|
||||||
|
|
||||||
|
### Stylus
|
||||||
|
|
||||||
|
![Stylus Screenshot][16]
|
||||||
|
|
||||||
|
在这个屏幕截图中, 我刚刚搜索并安装了一个黑暗的主题, 我正在上 Stylus 的网站。即使是弹出窗口也可以定制风格 (称为 Deepdark Stylus)!
|
||||||
|
|
||||||
|
[Stylus][17] 是一个用户样式管理器,这意味着通过编写自定义 CSS 规则并将其加载到 Stylus 中,您可以更改任何网页的外观。如果你不知道 CSS ,有大量的风格在其他网站上,如 [userstyles.org][18] 。
|
||||||
|
|
||||||
|
现在,你可能会问,“这不正是什么 [Stylish][19] 么?” 你是对的!你看 Stylus 是基于 Stylish 并提供了更多的改进:它不包含任何遥测数据, 尊重您的隐私,所有开发都是公开的(尽管 Stylish 仍在积极开发, 我一直未能找到最新版本的源代码), 而且它还支持 [UserCSS][20]。
|
||||||
|
|
||||||
|
UserCSS 是一种有趣的格式,尤其是对于开发人员。我已经为不同的网站写了几种用户样式(主要是黑暗的主题和调整,以提高可读性),虽然 Stylus 的内部编辑器很好,我还是喜欢用 Neovim 编辑代码。为了做到这样我所需要做的就是用 ".user.css" 作为本地加载文件的后缀名,在 Stylus 里启动 "Live Reload" 选项,所有更改都会被应用只要我在 Neovim 中启保存和更改文件。远程 UserCSS 文件也支持,因此,每当我将更改推送到 Github 或任何基于 git 的开发平台时,它们将自动对用户可用。(我提供了指向该文件的原始版本的链接, 以便他们可以轻松地访问它。)
|
||||||
|
|
||||||
|
### uMatrix
|
||||||
|
|
||||||
|
![uMatrix Screenshot][22]
|
||||||
|
|
||||||
|
uMatrix 的用户使用界面,显示当前访问过的网页的当前规则。
|
||||||
|
|
||||||
|
Jeremy Garcia 提到了 uBlock Origin 在 [his article][23] 在 Opensource.com 作为一个优秀的 blocker 。我想推荐另一个拓展插件作者是 [gorhill][24]: uMatrix 。
|
||||||
|
|
||||||
|
[uMatrix][25] 允许您为网页上的某些请求设置阻止规则,可以通过点击加载项的弹出窗口来切换(在上面的屏幕截图中可以看到)。 这些请求的区别在于脚本的类别、 scripts, cookies, CSS rules, images, media content, frames,和其他被 uMatrix 标记为 "other" 的 。 例如,您可以设置全局规则, 以便在默认情况下允许所有请求, 并将特定请求添加到黑名单中(更方便的方法),或在默认情况下阻止所有内容, 并手动将某些请求列入白名单 (更安全的方法)。如果您一直在使用NoScript 或 RequestPolicy,你可以 [import][26] 你的白名单规则。
|
||||||
|
|
||||||
|
另外 uMatrix 支持 [hosts files ][27],可用于阻止来自某些网站的请求。 不能与原始 uBlock 的筛选列表相比, 其使用的语法是 Adblock Plus 。默认情况下, uMatrix 会在几个文件的帮助下阻止已知分发广告、跟踪器和恶意软件的服务器, 如果需要, 您可以添加更多外部源。
|
||||||
|
|
||||||
|
那么你将选择哪一个-- uBlock Origin 或 uMatrix ?就个人而言,我在电脑上两个都用,只在安卓手机上用 uMatrix 。两者之间会有重叠的部分 [according to gorhill][28] ,但他们有不同的用户和目标群,如果你想要的只是阻止跟踪器和广告的简单方法, uBlock Origine 是更好的选择, 另一方面,如果您希望对网页在浏览器中可以执行或不能执行的操作进行精细的控制, 即使需要一些时间来进行配置, 并且可能会阻止网站按预期运行, uMatrix 是更好的选择。
|
||||||
|
|
||||||
|
### 结论
|
||||||
|
|
||||||
|
目前, 这些是 Firefox 里我最喜欢的扩展。Tridactyl 是依靠键盘和与外部程序交互, 加快浏览导航速度;Open With 能让我用鼠标点击程序操作, Stylus 是明确的用户风格的管理器, 对用户和开发人员都有吸引力; uMatrix 本质上是 Firefox 的防火墙用于过滤未知的请求。
|
||||||
|
|
||||||
|
尽管我几乎完全讨论了这些加载项的好处,但没有一个软件是完美的。如果你喜欢他们中的任何一个,并认为他们可以以任何方式改进, 我建议你去他们的 Github 页面,并寻找他们的贡献指南。通常情况下,免费和开源软件的开发人员欢迎错误报告和提交请求。告诉你的朋友或道谢也是帮助开发者的好方法, 特别是如果他们在业余时间从事他们的项目。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://opensource.com/article/18/6/firefox-open-source-extensions
|
||||||
|
|
||||||
|
作者:[Zsolt Szakács][a]
|
||||||
|
选题:[lujun9972](https://github.com/lujun9972)
|
||||||
|
译者:[lixinyuxx](https://github.com/lixinyuxx)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]:https://opensource.com/users/zsolt
|
||||||
|
[1]:https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||||
|
[2]:https://www.mozilla.org/en-US/MPL/
|
||||||
|
[3]:https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
[4]:/file/398411
|
||||||
|
[5]:https://opensource.com/sites/default/files/uploads/tridactyl.png "Tridactyl's new tab page, showcasing link hinting"
|
||||||
|
[6]:https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/
|
||||||
|
[7]:https://github.com/vimperator/vimperator-labs
|
||||||
|
[8]:https://addons.mozilla.org/en-US/firefox/addon/pentadactyl/
|
||||||
|
[9]:https://www.vim.org/
|
||||||
|
[10]:https://mpv.io/
|
||||||
|
[11]:https://rg3.github.io/youtube-dl/index.html
|
||||||
|
[12]:/file/398416
|
||||||
|
[13]:https://opensource.com/sites/default/files/uploads/openwith.png "A context menu provided by Open With. I can open the current page with one of the external programs listed here."
|
||||||
|
[14]:https://addons.mozilla.org/en-US/firefox/addon/open-with/
|
||||||
|
[15]:/file/398421
|
||||||
|
[16]:https://opensource.com/sites/default/files/uploads/stylus.png "In this screenshot, I've just searched for and installed a dark theme for the site I'm currently on with Stylus. Even the popup has custom style (called Deepdark Stylus)!"
|
||||||
|
[17]:https://addons.mozilla.org/en-US/firefox/addon/styl-us/
|
||||||
|
[18]:https://userstyles.org/
|
||||||
|
[19]:https://addons.mozilla.org/en-US/firefox/addon/stylish/
|
||||||
|
[20]:https://github.com/openstyles/stylus/wiki/Usercss
|
||||||
|
[21]:/file/398426
|
||||||
|
[22]:https://opensource.com/sites/default/files/uploads/umatrix.png "The user interface of uMatrix, showing the current rules for the currently visited webpage."
|
||||||
|
[23]:https://opensource.com/article/18/5/firefox-extensions
|
||||||
|
[24]:https://addons.mozilla.org/en-US/firefox/user/gorhill/
|
||||||
|
[25]:https://addons.mozilla.org/en-US/firefox/addon/umatrix
|
||||||
|
[26]:https://github.com/gorhill/uMatrix/wiki/FAQ
|
||||||
|
[27]:https://en.wikipedia.org/wiki/Hosts_(file)
|
||||||
|
[28]:https://github.com/gorhill/uMatrix/issues/32#issuecomment-61372436
|
@ -1,6 +1,8 @@
|
|||||||
使用 Fedora 28 中的模块
|
使用 Fedora 28 中的模块
|
||||||
======
|
======
|
||||||
|
|
||||||
![](https://fedoramagazine.org/wp-content/uploads/2018/05/modules-workingwith-816x345.jpg)
|
![](https://fedoramagazine.org/wp-content/uploads/2018/05/modules-workingwith-816x345.jpg)
|
||||||
|
|
||||||
最近 Fedora Magazine 中题为 [Fedora 28 服务器版的模块化][1]在解释 Fedora 28 中的模块化方面做得很好。它还给出了一些示例模块并解释了它们解决的问题。本文将其中一个模块用于实际应用,包括使用模块安装设置 Review Board 3.0。
|
最近 Fedora Magazine 中题为 [Fedora 28 服务器版的模块化][1]在解释 Fedora 28 中的模块化方面做得很好。它还给出了一些示例模块并解释了它们解决的问题。本文将其中一个模块用于实际应用,包括使用模块安装设置 Review Board 3.0。
|
||||||
|
|
||||||
### 入门
|
### 入门
|
||||||
@ -21,9 +23,9 @@ sudo dnf -y update
|
|||||||
dnf module list
|
dnf module list
|
||||||
```
|
```
|
||||||
|
|
||||||
输出列出了一组模块,这些模块显示了每个模块的关联流,版本和可用安装配置文件。模块流旁边的 [d] 表示安装命名模块时使用的默认流。
|
输出列出了一组模块,这些模块显示了每个模块的关联流、版本和可用安装配置文件。模块流旁边的 `[d]` 表示安装命名模块时使用的默认流。
|
||||||
|
|
||||||
输出还显示大多数模块都有名为 default 的配置文件。这不是巧合,因为 default 是默认配置文件使用的名称。
|
输出还显示大多数模块都有名为 `default` 的配置文件。这不是巧合,因为 `default` 是默认配置文件使用的名称。
|
||||||
|
|
||||||
要查看所有这些模块的来源,请运行:
|
要查看所有这些模块的来源,请运行:
|
||||||
|
|
||||||
@ -31,7 +33,7 @@ dnf module list
|
|||||||
dnf repolist
|
dnf repolist
|
||||||
```
|
```
|
||||||
|
|
||||||
与通常的 [fedora 和更新包仓库][5]一起,输出还显示了fedora-modular 和 updates-modular 仓库。
|
与通常的 [fedora 和更新包仓库][5]一起,输出还显示了 fedora-modular 和 updates-modular 仓库。
|
||||||
|
|
||||||
介绍声明你将设置 Review Board 3.0。也许名为 reviewboard 的模块在之前的输出中引起了你的注意。接下来,要获取有关该模块的一些详细信息,请运行以下命令:
|
介绍声明你将设置 Review Board 3.0。也许名为 reviewboard 的模块在之前的输出中引起了你的注意。接下来,要获取有关该模块的一些详细信息,请运行以下命令:
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ dnf module info reviewboard
|
|||||||
dnf module list reviewboard
|
dnf module list reviewboard
|
||||||
```
|
```
|
||||||
|
|
||||||
2.5 旁边的 [d] 表示它被配置为 reviewboard 的默认流。因此,请明确你想要的流:
|
2.5 旁边的 `[d]` 表示它被配置为 reviewboard 的默认流。因此,请明确你想要的流:
|
||||||
|
|
||||||
```
|
```
|
||||||
dnf module info reviewboard:3.0
|
dnf module info reviewboard:3.0
|
||||||
@ -65,7 +67,7 @@ dnf module info reviewboard:3.0 -v
|
|||||||
sudo dnf -y module install reviewboard:3.0
|
sudo dnf -y module install reviewboard:3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
输出显示已安装 ReviewBoard 以及其他几个依赖软件包,其中包括 django:1.6 模块中的几个软件包。安装还启用了reviewboard:3.0 模块和相关的 django:1.6 模块。
|
输出显示已安装 ReviewBoard 以及其他几个依赖软件包,其中包括 django:1.6 模块中的几个软件包。安装还启用了 reviewboard:3.0 模块和相关的 django:1.6 模块。
|
||||||
|
|
||||||
接下来,要查看已启用的模块,请使用以下命令:
|
接下来,要查看已启用的模块,请使用以下命令:
|
||||||
|
|
||||||
@ -73,13 +75,13 @@ sudo dnf -y module install reviewboard:3.0
|
|||||||
dnf module list --enabled
|
dnf module list --enabled
|
||||||
```
|
```
|
||||||
|
|
||||||
输出中,[e] 表示已启用的流,[i] 表示已安装的配置。对于 reviewboard:3.0 模块,已安装默认配置。你可以在安装模块时指定其他配置。实际上,你仍然可以安装它,而且这次你不需要指定 3.0,因为它已经启用:
|
输出中,`[e]` 表示已启用的流,`[i]` 表示已安装的配置。对于 reviewboard:3.0 模块,已安装默认配置。你可以在安装模块时指定其他配置。实际上,你仍然可以安装它,而且这次你不需要指定 3.0,因为它已经启用:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo dnf -y module install reviewboard/server
|
sudo dnf -y module install reviewboard/server
|
||||||
```
|
```
|
||||||
|
|
||||||
但是,安装 reviewboard:3.0/服务配置非常平常。reviewboard:3.0 模块的服务器配置与默认配置文件相同 - 因此无需安装。
|
但是,安装 reviewboard:3.0/server 配置非常平常。reviewboard:3.0 模块的服务器配置与默认配置文件相同 —— 因此无需安装。
|
||||||
|
|
||||||
### 启动 Review Board 网站
|
### 启动 Review Board 网站
|
||||||
|
|
||||||
@ -100,7 +102,7 @@ sudo setsebool -P httpd_can_sendmail=1 httpd_can_network_connect=1 \
|
|||||||
sudo systemctl enable --now httpd
|
sudo systemctl enable --now httpd
|
||||||
```
|
```
|
||||||
|
|
||||||
现在启动系统中的 Web 浏览器,打开 <http://localhost>,然后享受全新的 Review Board 网站!要以 Review Board 管理员身份登录,请使用上面 rb-site 命令中的用户 ID 和密码。
|
现在启动系统中的 Web 浏览器,打开 <http://localhost>,然后享受全新的 Review Board 网站!要以 Review Board 管理员身份登录,请使用上面 `rb-site` 命令中的用户 ID 和密码。
|
||||||
|
|
||||||
### 模块清理
|
### 模块清理
|
||||||
|
|
||||||
@ -118,12 +120,16 @@ sudo rm -rf /var/www/rev.local
|
|||||||
在 [Fedora 模块化][7]网站上了解有关在 Fedora 28 中使用模块的更多信息。dnf 手册页中的 module 命令部分也包含了有用的信息。
|
在 [Fedora 模块化][7]网站上了解有关在 Fedora 28 中使用模块的更多信息。dnf 手册页中的 module 命令部分也包含了有用的信息。
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
via: https://fedoramagazine.org/working-modules-fedora-28/
|
via: https://fedoramagazine.org/working-modules-fedora-28/
|
||||||
|
|
||||||
作者:[Merlin Mathesius][a]
|
作者:[Merlin Mathesius][a]
|
||||||
选题:[lujun9972](https://github.com/lujun9972)
|
选题:[lujun9972](https://github.com/lujun9972)
|
||||||
译者:[geekpi](https://github.com/geekpi)
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
[a]:https://fedoramagazine.org/author/merlinm/
|
[a]:https://fedoramagazine.org/author/merlinm/
|
||||||
[1]:https://fedoramagazine.org/modularity-fedora-28-server-edition/
|
[1]:https://fedoramagazine.org/modularity-fedora-28-server-edition/
|
||||||
[2]:https://getfedora.org/server/
|
[2]:https://getfedora.org/server/
|
||||||
|
@ -0,0 +1,314 @@
|
|||||||
|
[#]: collector: "lujun9972"
|
||||||
|
[#]: translator: "jlztan"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
[#]: subject: "What is PPA? Everything You Need to Know About PPA in Linux"
|
||||||
|
[#]: via: "https://itsfoss.com/ppa-guide/"
|
||||||
|
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||||
|
|
||||||
|
# 什么是 PPA?你需要知道的关于 Linux 中 PPA 的一切
|
||||||
|
|
||||||
|
**简介:一篇涵盖了在 Ubuntu 和其他 Linux 发行版中使用 PPA 的几乎所有问题的深入的文章。**
|
||||||
|
|
||||||
|
如果你一直在使用 Ubuntu 或基于 Ubuntu 的其他 Linux 发行版,例如 Linux Mint、Linux Lite、Zorin OS 等,你可能会遇到以下三行神奇的命令:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:dr-akulavich/lighttable
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install lighttable-installer
|
||||||
|
```
|
||||||
|
|
||||||
|
许多网站推荐使用类似于以上几行的形式 [在 Ubuntu 中安装应用程序][1]。这就是所谓的使用 PPA 安装应用程序。
|
||||||
|
|
||||||
|
但什么是 PPA?为什么用它?使用 PPA 安全吗?如何正确使用 PPA?如何删除 PPA?
|
||||||
|
|
||||||
|
我将在这个详细的指南中回答上述所有问题。即使你已经了解了一些关于 PPA 的事情,我相信这篇文章仍然会让你了解这方面的更多知识。
|
||||||
|
|
||||||
|
请注意我正在使用 Ubuntu 撰写本文。因此,我几乎可以在任何地方使用 Ubuntu 这个术语,但文中的说明和步骤也适用于其他基于 Debian/Ubuntu 的发行版。
|
||||||
|
|
||||||
|
### 什么是 PPA?为什么要使用 PPA?
|
||||||
|
|
||||||
|
![Everything you need to know about PPA in Ubuntu Linux][2]
|
||||||
|
|
||||||
|
PPA 表示 个人软件包存档Personal Package Archive<ruby>个人软件包存档<rt>Personal Package Archive</rt></ruby>。
|
||||||
|
|
||||||
|
这样说容易理解吗?可能不是很容易。
|
||||||
|
|
||||||
|
在了解 PPA 之前,你应该了解 Linux 中软件仓库的概念。关于软件仓库,在这里我不会详述。
|
||||||
|
|
||||||
|
#### 软件仓库和包管理的概念
|
||||||
|
|
||||||
|
软件仓库是一组文件,其中包含各种软件及其版本的信息,以及校验和等其他一些详细信息。每个版本的 Ubuntu 都有自己的四个官方软件仓库:
|
||||||
|
|
||||||
|
- Main - Canonical 支持的免费和开源软件。
|
||||||
|
- Universe - 社区维护的免费和开源软件。
|
||||||
|
- Restricted - 设备的专有驱动程序。
|
||||||
|
- Multiverse - 受版权或法律问题限制的软件。
|
||||||
|
|
||||||
|
你可以在 [这里][3] 看到所有版本的 Ubuntu 的软件仓库。你可以浏览并转到各个仓库。例如,可以在 [这里][4] 找到 Ubuntu 16.04 的主存储库。
|
||||||
|
|
||||||
|
所以,PPA 基本上是一个包含软件信息的网址。那你的系统又是如何知道这些仓库的位置的呢?
|
||||||
|
|
||||||
|
这些信息存储在 `/etc/apt` 目录中的 `sources.list` 文件中。如果查看此文件的内容,你就会看到里面有软件仓库的网址。`#` 开头的行将被忽略。
|
||||||
|
|
||||||
|
这样的话,当你运行 `sudo apt update` 命令时,你的系统将使用 [APT 工具][5] 来检查软件仓库并将软件及其版本信息存储在缓存中。当你使用 `sudo apt install package_name` 命令时,它通过该信息从实际存储软件的网址获取该软件包。
|
||||||
|
|
||||||
|
如果软件仓库中没有关于某个包的信息,你将看到如下错误:
|
||||||
|
|
||||||
|
```
|
||||||
|
E: Unable to locate package
|
||||||
|
```
|
||||||
|
|
||||||
|
此时,建议阅读我的 [apt 命令使用指南][6] 一文,这将帮你更好地理解 `apt`、`update` 等命令。
|
||||||
|
|
||||||
|
以上是关于软件仓库的内容。但什么是 PPA?PPA 和软件仓库又有什么关联呢?
|
||||||
|
|
||||||
|
#### 为什么要用 PPA?
|
||||||
|
|
||||||
|
如你所见,Ubuntu 对系统中的软件进行管理,更重要的是控制你在系统上获得哪个版本的软件。但想象一下开发人员发布了软件的新版本的情况。
|
||||||
|
|
||||||
|
Ubuntu 不会立即提供该新版本的软件。需要一个步骤来检查此新版本的软件是否与系统兼容,从而可以确保系统的稳定性。
|
||||||
|
|
||||||
|
但这也意味着它需要经过几周才能在 Ubuntu 上可用,在某些情况下,这可能需要几个月的时间。不是每个人都想等待那么长时间才能获得他们最喜欢的软件的新版本。
|
||||||
|
|
||||||
|
类似地,假设有人开发了一款软件,并希望 Ubuntu 将该软件包含在官方软件仓库中。在 Ubuntu 做出决定并将其包含在官方存软件仓库之前,还需要几个月的时间。
|
||||||
|
|
||||||
|
另一种情况是在 beta 测试阶段。即使官方软件仓库中提供了稳定版本的软件,软件开发人员也可能希望某些终端用户测试他们即将发布的版本。他们是如何使终端用户对即将发布的版本进行 beta 测试的呢?
|
||||||
|
|
||||||
|
通过 PPA!
|
||||||
|
|
||||||
|
### 如何使用 PPA?PPA 是怎样工作的?
|
||||||
|
|
||||||
|
正如我已经告诉过你的那样,[PPA][7] 代表个人软件包存档Personal Package Archive<ruby>个人软件包存档<rt>Personal Package Archive</rt></ruby>。在这里注意 “个人” 这个词,它暗示了这是开发人员独有的东西,并没有得到分发的正式许可。
|
||||||
|
|
||||||
|
Ubuntu 提供了一个名为 Launchpad 的平台,使软件开发人员能够创建自己的软件仓库。 终端用户,也就是你,可以将 PPA 仓库添加到 `sources.list` 文件中,当你更新系统时,你的系统会知道这个新软件的可用性,然后你可以使用标准的 `sudo apt install` 命令安装它。
|
||||||
|
|
||||||
|
`sudo add-apt-repository ppa:dr-akulavich/lighttable`
|
||||||
|
`sudo apt-get update`
|
||||||
|
`sudo apt-get install lighttable-installer`
|
||||||
|
|
||||||
|
概括一下上面三个命令:
|
||||||
|
|
||||||
|
- `sudo add-apt-repository <PPA_info>` < - 此命令将 PPA 仓库添加到列表中。
|
||||||
|
- `sudo apt-get update` < - 此命令更新可以在当前系统上安装的软件包列表。
|
||||||
|
- `sudo apt-get install <package_in_PPA>` < - 此命令安装软件包。
|
||||||
|
|
||||||
|
你会发现使用 `sudo apt update` 命令非常重要,否则你的系统将无法知道新软件包何时可用。
|
||||||
|
|
||||||
|
现在让我们更详细地看一下第一个命令。
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:dr-akulavich/lighttable
|
||||||
|
```
|
||||||
|
|
||||||
|
你会注意到此命令没有软件仓库的 URL。这是因为该工具被设计成将 URL 信息抽象之后再展示给你。
|
||||||
|
|
||||||
|
小小注意一下:如果你添加的是 `ppa:dr-akulavich/lighttable`,你会得到 Light Table。但是如果你添加 `ppa:dr-akulavich`,你将得到 “上层软件仓库” 中的所有仓库或软件包。它是按层级划分的。
|
||||||
|
|
||||||
|
基本上,当您使用 `add-apt-repository` 添加 PPA 时,它将执行与手动运行这些命令相同的操作:
|
||||||
|
|
||||||
|
```
|
||||||
|
deb http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main
|
||||||
|
deb-src http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu YOUR_UBUNTU_VERSION_HERE main
|
||||||
|
```
|
||||||
|
|
||||||
|
以上两行是将任何软件仓库添加到你系统的 `sources.list` 文件的传统方法。但 PPA 会自动为你完成这些工作,无需考虑确切的软件仓库 URL 和操作系统版本。
|
||||||
|
|
||||||
|
此处不那么重要的一点是,当你使用 PPA 时,它不会更改原始的 `sources.list` 文件。相反,它在 `/etc/apt/sources.d` 目录中创建了两个文件,一个 “list” 文件和一个带有 “save” 后缀的备份文件。
|
||||||
|
|
||||||
|
![Using a PPA in Ubuntu][8]
|
||||||
|
|
||||||
|
PPA 创建了单独的 `sources.list` 文件
|
||||||
|
|
||||||
|
带有后缀 “list” 的文件含有添加软件仓库的信息的命令。
|
||||||
|
|
||||||
|
![PPA add repository information][9]
|
||||||
|
|
||||||
|
一个 PPA 的 `source.list` 文件的内容
|
||||||
|
|
||||||
|
这是一种安全措施,可以确保添加的 PPA 不会和原始的 `sources.list` 文件弄混,它还有助于移除 PPA。
|
||||||
|
|
||||||
|
#### 为什么使用 PPA?为何不用 DEB 包
|
||||||
|
|
||||||
|
你可能会问为什么要使用 PPA,PPA 需要通过命令行使用,而不是每个人都喜欢用命令行。为什么不直接分发可以图形方式安装的 DEB 包呢?
|
||||||
|
|
||||||
|
答案在于更新的过程。如果使用 DEB 包安装软件,将无法保证在运行 `sudo apt update` 和 `sudo apt upgrade` 命令时,已安装的软件会被更新为较新的版本。
|
||||||
|
|
||||||
|
这是因为 apt 的升级过程依赖于 `sources.list` 文件。如果文件中没有相应的软件条目,则不会通过标准软件更新程序获得更新。
|
||||||
|
|
||||||
|
那么这是否意味着使用 DEB 安装的软件永远不会得到更新?不是的。这取决于 DEB 包的创建方式。
|
||||||
|
|
||||||
|
一些开发人员会自动在 `sources.list ` 中添加一个条目,这样软件就可以像普通软件一样更新。谷歌 Chrome 浏览器就是这样一个例子。
|
||||||
|
|
||||||
|
某些软件会在运行时通知你有新版本可用。你必须下载新的 DEB 包并再次运行,来将当前软件更新为较新版本。Oracle Virtual Box 就是这样一个例子。
|
||||||
|
|
||||||
|
对于其余的 DEB 软件包,你必须手动查找更新,这很不方便,尤其是在你的软件面向 Beta 测试者时,你需要频繁的添加很多更新。这正是 PPA 要解决的问题。
|
||||||
|
|
||||||
|
#### 官方 PPA vs 非官方 PPA
|
||||||
|
|
||||||
|
你或许听过官方 PPA 或非官方 PPA 这个词,二者有什么不同呢?
|
||||||
|
|
||||||
|
开发人员为他们的软件创建的 PPA 称为官方 PPA。很明显,这是因为它来自项目开发者。
|
||||||
|
|
||||||
|
但有时,个人会创建由其他开发人员所创建的项目的 PPA。
|
||||||
|
|
||||||
|
为什么会有人这样做? 因为许多开发人员只提供软件的源代码,而且你也知道 [在 Linux 中从源代码安装软件][10] 是一件痛苦的事情,并不是每个人都可以或者会这样做。
|
||||||
|
|
||||||
|
这就是志愿者自己从这些源代码创建 PPA 以便其他用户可以轻松安装软件的原因。毕竟,使用这 3 行命令比从源代码安装要容易得多。
|
||||||
|
|
||||||
|
#### 确保你的 Linux 发行版本可以使用 PPA
|
||||||
|
|
||||||
|
当在 Ubuntu 或任何其他基于 Debian 的发行版中使用 PPA 时,你应该记住一些事情。
|
||||||
|
|
||||||
|
并非每个 PPA 都适用于你的特定版本。你应该知道正在使用 [哪个版本的 Ubuntu][11]。版本的开发代号很重要,因为当你访问某个 PPA 的页面时,你可以看到该 PPA 都支持哪些版本的 Ubuntu。
|
||||||
|
|
||||||
|
对于其他基于 Ubuntu 的发行版,你可以查看 `/etc/os-release` 的内容来 [找出 Ubuntu 版本][11] 的信息。
|
||||||
|
|
||||||
|
![Verify PPA availability for Ubuntu version][12]
|
||||||
|
|
||||||
|
检查 PPA 是否适用于你的 Ubuntu 版本
|
||||||
|
|
||||||
|
如何知道 PPA 的网址呢?只需在网上搜索 PPA 的名称,如 `ppa:dr-akulavich/lighttable`,第一个搜索结果来自 [Launchpad][13],这是托管 PPA 的官方平台。你也可以转到 Launchpad 并直接在那里搜索所需的 PPA。
|
||||||
|
|
||||||
|
如果不验证是否适用当前的版本就添加 PPA,当尝试安装不适用于你的系统版本的软件时,可能会看到类似下面的错误。
|
||||||
|
|
||||||
|
```
|
||||||
|
E: Unable to locate package
|
||||||
|
```
|
||||||
|
|
||||||
|
更糟糕的是,因为它已经添加到你的 `source.list` 中,每次运行软件更新程序时,你都会看到 “[无法下载软件仓库信息][14]” 的错误。
|
||||||
|
|
||||||
|
![Failed to download repository information Ubuntu 13.04][15]
|
||||||
|
|
||||||
|
如果你在终端中运行 `sudo apt update`,错误提示将包含导致此问题的仓库的更多详细信息。你可以在 `sudo apt update` 的输出内容结尾看到类似的内容:
|
||||||
|
|
||||||
|
```
|
||||||
|
W: Failed to fetch http://ppa.launchpad.net/venerix/pkg/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found
|
||||||
|
E: Some index files failed to download. They have been ignored, or old ones used instead.
|
||||||
|
```
|
||||||
|
|
||||||
|
上面的错误提示说的很明白,是因为系统找不到当前版本对应的仓库。还记得我们之前看到的仓库结构吗?APT 将尝试在 <http://ppa.launchpad.net/\><PPA_NAME>/ubuntu/dists/Ubuntu_Version 中寻找软件信息。
|
||||||
|
|
||||||
|
如果特定版本的 PPA 不可用,它将永远无法打开 URL,你会看到著名的404错误。
|
||||||
|
|
||||||
|
#### 为什么 PPA 不适用于所有 Ubuntu 发行版?
|
||||||
|
|
||||||
|
这是因为 PPA 的作者必须编译软件并在特定版本上创建 PPA。考虑到每六个月发布一个新的 Ubuntu 版本,为每个版本的 Ubuntu 更新 PPA 是一项繁琐的任务,并非所有开发人员都有时间这样做。
|
||||||
|
|
||||||
|
#### 如果 PPA 不适用于你的系统版本,该如何安装应用程序?
|
||||||
|
|
||||||
|
尽管 PPA 不适用于你的 Ubuntu 版本,你仍然可以下载 DEB 文件并安装应用程序。
|
||||||
|
|
||||||
|
比如说,你访问 Light Table 的 PPA 页面,使用刚刚学到的有关 PPA 的知识,你会发现 PPA 不适用于你的特定 Ubuntu 版本。
|
||||||
|
|
||||||
|
你可以点击 `查看软件包详细信息`。
|
||||||
|
|
||||||
|
![Get DEB file from PPA][16]
|
||||||
|
|
||||||
|
在这里,你可以单击软件包以显示更多详细信息,还可以在此处找到包的源代码和 DEB 文件。
|
||||||
|
|
||||||
|
![Download DEB file from PPA][17]
|
||||||
|
|
||||||
|
我建议 [使用 Gdebi 安装这些 DEB 文件][18] 而不是通过软件中心,因为 Gdebi 在处理依赖项方面要好得多。
|
||||||
|
|
||||||
|
请注意,以这种方式安装的软件包可能无法获得任何将来的更新。
|
||||||
|
|
||||||
|
我认为你已经阅读了足够多的关于添加 PPA 的内容,那么如何删除 PPA 及其安装的软件呢?
|
||||||
|
|
||||||
|
### 如何删除 PPA?
|
||||||
|
|
||||||
|
我过去曾写过 [删除 PPA][19] 的教程,这里写的也是同样的方法。
|
||||||
|
|
||||||
|
我建议在删除 PPA 之前删除从 PPA 安装的软件。如果只是删除 PPA,则已安装的软件仍保留在系统中,但不会获得任何更新。这不是你想要的,不是吗?
|
||||||
|
|
||||||
|
那么,问题来了,如何知道是哪个 PPA 安装了哪个应用程序?
|
||||||
|
|
||||||
|
#### 查找 PPA 安装的软件包并将其移除
|
||||||
|
|
||||||
|
Ubuntu 软件中心无法移除 PPA 安装的软件包,你必须使用具有更多高级功能的 Synaptic 包管理器。
|
||||||
|
|
||||||
|
可以从软件中心安装 Synaptic 或使用以下命令进行安装:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install synaptic
|
||||||
|
```
|
||||||
|
|
||||||
|
安装后,启动 Synaptic 包管理器并选择 Origin。你会看到添加到系统的各种软件仓库。 PPA 条目将以前缀 PPA 进行标识,单击以查看 PPA 可用的包。已安装的软件前面会有恰当的符号进行标识。
|
||||||
|
|
||||||
|
![Managing PPA with Synaptic package manager][20]
|
||||||
|
|
||||||
|
查找通过 PPA 安装的软件包
|
||||||
|
|
||||||
|
找到包后,你可以从 Synaptic 删除它们。此外,也始终可以选择使用命令行进行移除:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt remove package_name
|
||||||
|
```
|
||||||
|
|
||||||
|
删除 PPA 安装的软件包后,你可以继续从 `sources.list` 中删除PPA。
|
||||||
|
|
||||||
|
#### 以图形界面的方式删除 PPA
|
||||||
|
|
||||||
|
在设置中打开 “软件和更新”,然后点击 “其他软件” 选项卡。查找要删除的 PPA:
|
||||||
|
|
||||||
|
![Delete a PPA from Software Source][21]
|
||||||
|
|
||||||
|
此处你可以进项两项操作,可以取消选择 PPA 或选择 “删除” 选项。
|
||||||
|
|
||||||
|
区别在于,当你取消选择 PPA 条目时,系统将在 `/etc/apt/sources.list.d` 中的`ppa_name.list` 文件中注释掉仓库条目;但如果选择 “删除” 选项,将会删除 `/etc/apt/sources.list.d`目录中 `ppa_name.list` 文件里的仓库条目。
|
||||||
|
|
||||||
|
在这两种情况下,文件 `ppa_name.list` 都保留在所在的目录中,即使它是空的。
|
||||||
|
|
||||||
|
### 使用 PPA 安全吗?
|
||||||
|
|
||||||
|
这是一个主观问题。纯粹主义者厌恶 PPA,因为大多数时候 PPA 来自第三方开发者。但与此同时,PPA 在 Debian/Ubuntu 世界中很受欢迎,因为它们提供了更简单的安装选项。
|
||||||
|
|
||||||
|
就安全性而言,使用 PPA 之后,你的 Linux 系统被黑客攻击或注入恶意软件的可能性较小。到目前为止,我不记得发生过这样的事件。
|
||||||
|
|
||||||
|
官方 PPA 可以不加考虑的使用,使用非官方 PPA 完全是你自己的决定。
|
||||||
|
|
||||||
|
根据经验,如果程序需要 sudo 权限,则应避免通过第三方 PPA 进行安装。
|
||||||
|
|
||||||
|
### 你如何看待使用 PPA?
|
||||||
|
|
||||||
|
我知道这篇文章需要挺长时间来阅读,但我想让你更好地了解 PPA。我希望这份详细指南能够回答你关于使用 PPA 的大部分问题。
|
||||||
|
|
||||||
|
如果你对 PPA 有更多疑问,请随时在评论区提问。
|
||||||
|
|
||||||
|
如果你发现任何技术或语法错误,或者有改进的建议,请告诉我。
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/ppa-guide/
|
||||||
|
|
||||||
|
作者:[Abhishek Prakash][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[jlztan](https://github.com/jlztan)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/abhishek/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://itsfoss.com/remove-install-software-ubuntu/
|
||||||
|
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/what-is-ppa.png?resize=800%2C450&ssl=1
|
||||||
|
[3]: http://archive.ubuntu.com/ubuntu/dists/
|
||||||
|
[4]: http://archive.ubuntu.com/ubuntu/dists/xenial/main/
|
||||||
|
[5]: https://wiki.debian.org/Apt
|
||||||
|
[6]: https://itsfoss.com/apt-command-guide/
|
||||||
|
[7]: https://launchpad.net/ubuntu/+ppas
|
||||||
|
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/01/ppa-sources-list-files.png?resize=800%2C259&ssl=1
|
||||||
|
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/01/content-of-ppa-list.png?ssl=1
|
||||||
|
[10]: https://itsfoss.com/install-software-from-source-code/
|
||||||
|
[11]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||||
|
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/12/verify-ppa-availibility-version.jpg?resize=800%2C481&ssl=1
|
||||||
|
[13]: https://launchpad.net/
|
||||||
|
[14]: https://itsfoss.com/failed-to-download-repository-information-ubuntu-13-04/
|
||||||
|
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2013/04/Failed-to-download-repository-information-Ubuntu-13.04.png?ssl=1
|
||||||
|
[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/deb-from-ppa.jpg?resize=800%2C483&ssl=1
|
||||||
|
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/deb-from-ppa-2.jpg?resize=800%2C477&ssl=1
|
||||||
|
[18]: https://itsfoss.com/gdebi-default-ubuntu-software-center/
|
||||||
|
[19]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/
|
||||||
|
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/01/ppa-synaptic-manager.jpeg?resize=800%2C394&ssl=1
|
||||||
|
[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2012/08/Delete-a-PPA.jpeg?ssl=1
|
Loading…
Reference in New Issue
Block a user