Linux - Ubuntu gpg: can‘t connect to the agent: IPC connect call failed
添加Podman PPA并安装Podman;
在Ubuntu上开始安装Podman的简单方法是使用Kubic项目.Kubic项目提供了适用于Ubuntu 18.04、19.04、19.10和20.04的软件包。您可以按如下所示轻松地将此软件包添加到Ubuntu发行版中
. /etc/os-release
sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get -qq -y install podman
sudo mkdir -p /etc/containers
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | sudo tee /etc/containers/registries.conf
root@N-20HEPF15JN1Q:/home/ubuntu# podman info
Error: error getting registries: unable to parse the registries.conf file: error loading registries configuration "/etc/containers/registries.conf": Near line 1 (last key parsed 'registries.search'): expected a top-level item to end with a newline, comment, or EOF, but got 'n' instead
注意: echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | sudo tee /etc/containers/registries.conf
[registries.search] 后面的‘n’应该是'\n',许多网上互相抄的博客,不知道是不是都没有亲自操作过,写错了还不知道呢。。。
在红帽上找到了正确的命令,才执行成功了;https://www.redhat.com/sysadmin/podman-windows-wsl2
确认我们的podman是否已成功安装
podman info
然而。。。
root@N-20HEPF15JN1Q:/home/ubuntu# . /etc/os-release
root@N-20HEPF15JN1Q:/home/ubuntu# sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
root@N-20HEPF15JN1Q:/home/ubuntu#
root@N-20HEPF15JN1Q:/home/ubuntu#
root@N-20HEPF15JN1Q:/home/ubuntu# curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1094 100 1094 0 0 976 0 0:00:01 0:00:01 --:--:-- 977
gpg: can't connect to the agent: IPC connect call failed
发现报错:
gpg: can't connect to the agent: IPC connect call failed // gpg:无法连接到代理:IPC连接调用失败
在网上谷歌了半天,先是启动 gpg agent: gpg-agent –daemon ,然而无效。
陆陆续续查了很多修改方法,最后下面这个方法奏效了(注意获取root权限):
sudo apt remove gpg
sudo apt install gnupg1
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南