当我使用 sudo apt update 时收到警告:“没有组件‘stella.cmit’”

当我使用 sudo apt update 时收到警告:“没有组件‘stella.cmit’”

使用 Ubuntu 22.04,一切似乎正常,但是当我...时收到警告sudo apt update

W: Skipping acquire of configured file 'stella.cmit/cnf/Commands-amd64' as repository 'http://hp.archive.canonical.com jammy InRelease' doesn't have the component 'stella.cmit' (component misspelt in sources.list?)

不知道这是否是原因,但我在添加ppafor后注意到了它gpodder

sudo add-apt-repository ppa:gpodder/pp
/etc/apt/sources.list.d/oem-stella.cmit-aron-meta.list and
/etc/apt/sources.list.d/oem-stella.cmit-aron-meta.list.distUpgrade

deb http://hp.archive.canonical.com/ jammy stella
# deb-src http://hp.archive.canonical.com/ focal stella
deb http://hp.archive.canonical.com/ jammy stella.cmit
# deb-src http://hp.archive.canonical.com/ focal stella.cmit

从我读到的内容来看,这听起来像是我的问题,/etc/apt/sources.list但我不知道我在看什么。

# deb cdrom:[Ubuntu 20.04 _Focal_ - Build amd64 LIVE Binary 20220223-06:11]/ focal main

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution. deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team. deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse deb http://us.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

答案1

根据我收到的有用答案和评论,尤其是“grep -r 'stella.cmit' /etc/apt/”。我导航到文件夹 /etc/apt/sources.list.d 并在终端中输入:

sudo mv oem-stella.cmit-aron-meta.list oem-stella.cmit-aron-meta.list.disabled

仍然不确定它应该做什么,但一切似乎都正常,重启系统后,我不再收到警告。不确定我是否必须重启,但我就是这么做的。

答案2

使用此脚本:

#!/bin/bash
# Detect os codename
codename=$(awk '/UBUNTU_CODENAME=/' /etc/os-release | sed 's/UBUNTU_CODENAME=//' | sed 's/[.]0/./')

# Disable all the external repos
cd /etc/apt/sources.list.d && sudo bash -c 'for i in *.list; do mv ${i} ${i}.disabled; done' && cd /tmp

# Replace sources.list  
text="deb http://archive.ubuntu.com/ubuntu/ $codename main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu/ $codename main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu $codename-security main universe restricted multiverse
deb-src http://security.ubuntu.com/ubuntu $codename-security main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu/ $codename-updates main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu/ $codename-updates main universe restricted multiverse"

sudo echo "$text" | sudo tee /etc/apt/sources.list

# Start upgrade
sudo apt update
sudo apt install -f -y
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove --purge -y

这将恢复默认的 sources.list 并禁用所有外部存储库。

来源https://github.com/daboynb/linux_scripts

/etc/apt/sources.list.d 内的所有内容都将被禁用。仅启用您需要的部分!

例子sudo mv /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-jammy.list.disabled /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-jammy.list

相关内容