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

LMDE 4 Debbie安装Terraform时apt源404及无法找到软件包错误

故障原因说明

HashiCorp官方APT源未提供LMDE 4对应版本代号debbie的软件包索引,LMDE 4 本质基于Debian 10(版本代号buster),替换源的版本代号即可修复该问题。

修复步骤

1. 删除错误的源配置

执行命令删除之前添加的错误HashiCorp源文件:

sudo rm /etc/apt/sources.list.d/hashicorp.list

如果源配置写在/etc/apt/sources.list主文件中,直接编辑文件删除对应的HashiCorp源行即可。

2. 导入HashiCorp公钥

执行命令导入官方签名公钥,避免后续安装时出现签名校验错误:

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg

3. 添加正确的APT源

手动指定使用Debian 10的buster版本代号添加源:

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com buster main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

4. 重新安装Terraform

  • 更新APT缓存:
    sudo apt update
  • 执行安装命令:
    sudo apt install terraform

验证安装结果

执行terraform -v,返回版本信息即为安装成功。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.30 07:30:02