elementaryOS 无法通过 PPA 安装应用程序

elementaryOS 无法通过 PPA 安装应用程序

从标题您可能已经看出来,我是 Linux 环境方面的完全新手。

尝试弄清楚如何使用 安装应用程序sudo apt-get install。我已经能够安装一些应用程序,但最近开始失败。

例如我想安装 elementary-tweaks,但错误消息都是一样的E: Unable to locate package elementary-tweaks

思考我知道如果我添加 PPA,我应该访问与该 PPA 关联的软件包。

因此,我尝试删除以前的 PPA(正如本网站上的一些答案所见),并添加以下内容:https://code.launchpad.net/~versable/+archive/ubuntu/elementary-update后面跟着一个sudo apt-get update

我也尝试过sudo apt-get -f installPPA 清除等等……

但错误信息仍然存在。

错误信息:

Reading package lists... Done
Building dependency tree        
Reading state information... Done
E: Unable to locate package elementary-tweaks

有人能帮我指出一下,我遗漏了什么吗?还有,类似情况的可能解决方案是什么?

谢谢!

答案1

这应该适用于任何 Elementary OS,这是添加 ppa 的正确方法

sudo apt-add-repository ppa:versable/elementary-update
sudo apt-get update
sudo apt-get install elementary-tweaks

所以..如果这不起作用那么用错误更新Q

答案2

确保您在主目录中。只需关闭终端并打开一个新的终端窗口。

通过https://launchpad.net/elementary-tweaks

sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily && sudo apt-get update && sudo apt-get install elementary-tweaks

答案3

  1. 备份你的/etc/apt/sources.list先归档

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

  2. 编辑你的/etc/apt/sources.list

    sudo nano /etc/apt/sources.list

  3. 复制粘贴以下内容和节省 /etc/apt/sources.list文件

  4. 更新易于

    sudo apt update

  5. 尝试再次安装您的应用。例如:

    sudo apt install snapd


# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to  
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse```

相关内容