第一步:确认软件源配置文件
- 打开软件源配置文件:
sudo nano /etc/apt/sources.list
- 将所有
http://deb.debian.org/debian/替换为http://mirrors.aliyun.com/debian/,将http://security.debian.org/debian-security替换为http://mirrors.aliyun.com/debian-security/。修改后的文件内容如下:
deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
- 保存并退出,然后更新缓存并安装:
sudo apt update
sudo apt install -y language-pack-zh-hans language-pack-zh-hans-base language-pack-zh-hant language-pack-zh-hant-base
检查是否有拼写错误
仔细检查你输入的命令是否有拼写错误。你之前的错误信息中 languege-pack-zh-hans-base 存在拼写错误,正确的应该是 language-pack-zh-hans-base。请确保你使用的是正确的包名。