You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法更新Digital Ocean Droplet,Perforce更新失败求助

解决Digital Ocean Droplet上的Perforce相关问题

一、修复apt update错误

1. 处理过期的Perforce签名密钥

Perforce软件包的签名密钥已过期,导致验证失败,重新导入最新密钥:

curl -fsSL https://package.perforce.com/perforce.pubkey | sudo gpg --dearmor -o /usr/share/keyrings/perforce-archive-keyring.gpg

若系统仍使用旧版apt-key,可兼容执行:

curl -s https://package.perforce.com/perforce.pubkey | sudo apt-key add -

2. 移除重复的软件源配置

错误提示Perforce源同时存在于/etc/apt/sources.list第58行和/etc/apt/sources.list.d/perforce.list中,保留其中一个即可:

  • 方案1:注释掉sources.list中的重复条目
sudo sed -i '58s/^/#/' /etc/apt/sources.list
  • 方案2:删除单独的perforce源文件
sudo rm /etc/apt/sources.list.d/perforce.list

3. 重新执行更新

完成上述操作后,再次运行:

sudo apt update

此时apt update的错误应消失。

二、修复p4 info连接失败问题

1. 检查本地Perforce服务器状态

错误提示无法连接本地127.0.0.1:1666,先确认Perforce服务器(helix-p4d)是否运行:

sudo systemctl status helix-p4d
  • 若未运行,启动服务:
sudo systemctl start helix-p4d
  • 设置开机自动启动:
sudo systemctl enable helix-p4d

2. 确认P4PORT配置

若Perforce服务器不在本地(比如是远程服务器),修正P4PORT环境变量:

  • 临时生效:
export P4PORT=你的服务器IP:1666
  • 永久生效(写入用户bash配置):
echo 'export P4PORT=你的服务器IP:1666' >> ~/.bashrc
source ~/.bashrc

3. 验证连接

重新执行:

p4 info

配置正确的话,会正常返回服务器信息。

内容的提问来源于stack exchange,提问作者Paul Brown

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 05:21:07