申请在Linux虚拟机内添加中文语言包,个人安装apt命令报错

anmianpian@penguin:~$ sudo apt-get update && apt-get install language-pack-zh-hans
Ign:1 http://mirrors.aliyun.com/debian stretch InRelease
Hit:2 http://mirrors.aliyun.com/debian-security stretch/updates InRelease
Hit:3 http://mirrors.aliyun.com/debian stretch Release                            
Ign:5 https://deb-mirror.fydeos.com/cros-packages/77 stretch InRelease            
Hit:6 https://deb-mirror.fydeos.com/cros-packages/77 stretch Release
Ign:8 https://cdn-aws.deb.debian.org/debian stretch InRelease
Hit:9 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Hit:10 https://cdn-aws.deb.debian.org/debian stretch Release
Reading package lists... Done
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

何不试试

sudo apt-get update && sudo apt-get install language-pack-zh-hans
1 个赞
感谢,可以了,权限是一方面,dpkg-reconfigure locales解决的问题。