以下是有问题的别名:
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
alias upgrate='sudo apt-get update && sudo apt-get upgrade'
这是我运行更新时的输出:
[Wed Jul 08 20:47] gsw @ MacWoody:~ $ update
[sudo] password for gsw:
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://dl.yarnpkg.com/debian stable InRelease
Ign:5 http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy InRelease
Hit:6 http://repository.spotify.com stable InRelease
Err:7 http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy Release' does not have a Release file.
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.
这是我运行升级时的输出:
[Wed Jul 08 20:47] gsw @ MacWoody:~ $ upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
这是我运行 update 时的输出,它应该结合两个进程。在我看来,它好像没有执行命令的升级部分,我不确定为什么:
[Wed Jul 08 20:48] gsw @ MacWoody:~ $ upgrate
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 https://dl.yarnpkg.com/debian stable InRelease
Ign:3 http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy InRelease
Hit:4 http://repository.spotify.com stable InRelease
Hit:5 http://deb.debian.org/debian buster InRelease
Hit:6 http://deb.debian.org/debian buster-updates InRelease
Err:7 http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/djcj/screenfetch/ubuntu groovy Release' does not have a Release file.
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.
根据upgrate的输出,它看起来好像只是更新存储库,但没有继续升级包。感谢您提供的任何帮助或信息,谢谢
答案1
&&
意味着只有前一个命令以 . 退出时,以下命令才会运行0
。
由于apt-get update
会产生错误,因此它的返回代码不会0
- 因此apt-get upgrade
不会被执行。
解决方法:
alias upgrate='sudo apt-get update; sudo apt-get upgrade'