【日常笔记】解决 apt-get install 安装失败问题

Ubuntu 服务器中遇到问题如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package tmux

解决方法如下:

apt-get update

又遇到问题如下:

Get:1 http://mirrors.aliyun.com/ubuntu focal InRelease [265 kB]
Err:1 http://mirrors.aliyun.com/ubuntu focal InRelease
  Couldn't create temporary file /tmp/apt.conf.SZpybv for passing config to apt-key
Get:2 http://mirrors.aliyun.com/ubuntu focal-security InRelease [128 kB]
Err:2 http://mirrors.aliyun.com/ubuntu focal-security InRelease
  Couldn't create temporary file /tmp/apt.conf.xMHX2y for passing config to apt-key
Get:3 http://mirrors.aliyun.com/ubuntu focal-updates InRelease [128 kB]
Err:3 http://mirrors.aliyun.com/ubuntu focal-updates InRelease
  Couldn't create temporary file /tmp/apt.conf.ShEiXD for passing config to apt-key
Get:4 http://mirrors.aliyun.com/ubuntu focal-backports InRelease [128 kB]
Err:4 http://mirrors.aliyun.com/ubuntu focal-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.uP86NE for passing config to apt-key
Get:5 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease [277 kB]
Err:5 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease
  Couldn't create temporary file /tmp/apt.conf.kMZExN for passing config to apt-key
Get:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InRelease [1581 B]
Err:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InRelease
  Couldn't create temporary file /tmp/apt.conf.lLDeMT for passing config to apt-key
Reading package lists... Done
W: GPG error: http://mirrors.aliyun.com/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.SZpybv for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu focal 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.
W: GPG error: http://mirrors.aliyun.com/ubuntu focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.xMHX2y for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu focal-security 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.
W: GPG error: http://mirrors.aliyun.com/ubuntu focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.ShEiXD for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu focal-updates 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.
W: GPG error: http://mirrors.aliyun.com/ubuntu focal-backports InRelease: Couldn't create temporary file /tmp/apt.conf.uP86NE for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu focal-backports 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.
W: GPG error: http://mirrors.aliyun.com/ubuntu focal-proposed InRelease: Couldn't create temporary file /tmp/apt.conf.kMZExN for passing config to apt-key
E: The repository 'http://mirrors.aliyun.com/ubuntu focal-proposed 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.
W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InRelease: Couldn't create temporary file /tmp/apt.conf.lLDeMT for passing config to apt-key
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  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.

解决方法如下:

chmod 1777 /tmp
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值