Ubuntu:Adding a software repository

Adding a software repository

Software is available from third-party sources, as well as from the default Ubuntu software repositories. If you want to install software from a third-party software repository, you must add it to the package manager's list of available repositories.

[Caution] 

Only add software repositories from sources that you trust. Third-party software repositories are not checked for security by Ubuntu members, and may contain software which is harmful to your computer.

  1. Open SystemAdministrationSoftware Sources and select Other Software.

  2. Click Add to add a new repository.

  3. Enter the APT line for the extra repository. This should be available from the website of the repository, and should look similar to the following:

    deb http://archive.ubuntu.com/ubuntu/ lucid main
  4. Click Add Source and then click Close to save your changes.

  5. You will be notified that the information about available software is out-of-date. Click Reload.

  6. Packages from the new repository should now be available in your package manager.

As a security measure, most software repositories use a GPG key to digitally sign the files they provide. This makes it easy to check that the files have not been tampered with since their creation. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the repository's website.

Download the GPG key. Then, click System AdministrationSoftware Sources, select the Authentication tab, click Import Key File and select the GPG key to be imported.

You can also add the GPG key using the terminal by entering the following command:

                
                  sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com key-fingerprint
                
              

Adding a Personal Package Archive (PPA)

Launchpad provides all users with their own Personal Package Archive (PPA) that can be used to build and store Ubuntu packages. In the same way that you can add a normal software repository, you can also add a PPA to the package manager's list of available repositories. PPAs work like normal Ubuntu archives. You can install software in the usual way -- for example, through apt-get or synaptic -- and whenever there's an update Ubuntu will prompt you to install it.

[Caution] 

You download and install PPA packages at your own risk. Ubuntu, Launchpad and Canonical do not endorse these packages. You must be certain that you trust the PPA owner before you install their software.

You should begin by familiarizing yourself with the section called “Adding a software repository” before beginning.

The APT line for the PPA can be found on the PPA overview page on Launchpad, and should look similar to the following:

deb http://ppa.launchpad.net/user/ppa/ppa-name lucid main

As a security measure, all PPAs use a unique GPG key to digitally sign the packages that they provide. This makes it easy to check that the packages have not been tampered with since Launchpad built them and to be sure that you are downloading from the PPA that you want. In order for your package manager to be able to check this, you need the public key that corresponds to the signatures. The key should be available for download on the PPA overview page on Launchpad. Until you add the PPA's key to your system, you will see warnings that you are downloading from an untrusted source.

The key used to sign a PPA is listed on the PPA overview page. Instructions on how to add the key can be found in the section called “Adding a software repository”.

Additional information about adding a PPA repository can be found on Launchpad.


"The following problems have occurred when adding the files: not a git repository (or any of the parent directories): .git" 这个错误信息表明在添加文件时出现了问题,可能是因为当前目录不是一个git仓库或者没有找到.git文件夹。这个错误通常发生在使用git命令时,git无法在当前目录或其父目录中找到.git文件夹。 这个问题的解决方法取决于你使用的是哪种情况。如果你已经创建了一个git仓库,但是在提交代码时遇到了这个错误,那么可能是由于其他git进程正在运行,比如一个编辑器正在打开'git commit'。你可以尝试关闭这些进程,然后重新尝试提交代码。 另外,如果你的项目还没有初始化为git仓库,或者.git文件夹丢失了,你需要先在项目根目录下使用git init命令来初始化一个新的git仓库。然后你就可以使用git add命令将文件添加到git仓库中,并使用git commit命令提交代码了。 总结来说,这个错误通常是由于当前目录不是一个git仓库或者.git文件夹丢失引起的。你需要确认你的项目是否已经初始化为git仓库,并检查是否有其他git进程在运行。如果没有初始化为git仓库,你需要使用git init命令初始化一个新的git仓库。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [git报错:Unable to create ‘D:/code_idea/code_java/XXProject/.git/index.lock‘: File exists.](https://blog.csdn.net/Happy_Sunshine_Boy/article/details/115372588)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [解决 github项目clone报错 Failed connect to github.com:443; Connection](https://download.csdn.net/download/weixin_38714641/14053810)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Bug记录-Warning:Integration interrupted. There are unresolved conflicts or skipped items.问题解决](https://blog.csdn.net/qq_44695727/article/details/124961304)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值