软件包‘libtinfo5’没有安装候选项

软件包‘libtinfo5’没有安装候选项

我正在尝试在 Ubuntu 上安装 libtinfo5。这样我就可以安装 GHCUP 并使用 Haskell/Plutus 编程

有人知道如何解决这个错误吗?

ubuntu@ubuntu:~$ sudo apt-get update
Ign:1 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal InRelease
Hit:2 cdrom://Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1) focal Release
Get:4 https://cli.github.com/packages stable InRelease [3743 B]                                                                                                                           
Err:4 https://cli.github.com/packages stable InRelease                                                                                                                                    
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C99B11DEB97541F0
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                 
Hit:6 https://updates.signal.org/desktop/apt xenial InRelease                                                                                                           
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease                                                     
Get:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]              
Hit:9 http://dl.google.com/linux/chrome/deb stable InRelease                                    
Hit:10 http://packages.microsoft.com/repos/code stable InRelease
Reading package lists... Done            
W: GPG error: https://cli.github.com/packages stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C99B11DEB97541F0
E: The repository 'https://cli.github.com/packages stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
ubuntu@ubuntu:~$ sudo apt-get install libtinfo5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libtinfo5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libtinfo5' has no installation candidate
ubuntu@ubuntu:~$ sudo apt-get install -y libtinfo5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libtinfo5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libtinfo5' has no installation candidate

答案1

首先,你必须通过以下方式修复 GitHub CLI 存储库的 GPG 问题:使用命令以下:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0

/etc/apt/sources.list然后通过直接使用文本编辑器或使用软件和更新( )应用程序禁用 cdrom 源software-properties-gtk

然后添加宇宙使用同一应用程序或使用命令将存储库添加到系统中

sudo add-apt-repository universe

最后更新包列表并安装所需的包:

sudo apt-get update
sudo apt-get install libtinfo5

相关内容