安装Balena Etcher时遇到未满足依赖问题求助
我最近尝试用BalenaEtcher制作启动盘,但在安装程序的时候碰到了依赖错误。我从它的GitHub发布页面下载了主.deb文件,运行sudo apt install ./balena-etcher_1.19.5_amd64.deb后出现了下面的错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'balena-etcher' instead of './balena-etcher_1.19.5_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:
balena-etcher : Depends: gconf-service but it is not installable
Depends: gconf2 but it is not installable
Depends: libgconf-2-4 but it is not installable
解决方法:通过官方软件源安装Balena Etcher
问题出在较新的Ubuntu发行版(比如22.04 LTS及之后版本)已经移除了gconf系列的依赖包,直接下载deb包安装自然会碰到依赖缺失的情况。推荐用官方提供的软件源来安装,这样系统会自动处理所有依赖,步骤如下:
- 首先添加官方的GPG密钥,确保后续安装的软件包是可信的:
curl -1sLf 'https://dl.cloudsmith.io/public/balena/etcher/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/balena-etcher-archive-keyring.gpg
- 将Balena Etcher的软件源添加到系统的源列表中:
echo "deb [signed-by=/usr/share/keyrings/balena-etcher-archive-keyring.gpg] https://dl.cloudsmith.io/public/balena/etcher/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/balena-etcher.list
- 更新本地的软件包索引,让系统识别到新添加的源:
sudo apt update
- 最后安装Balena Etcher:
sudo apt install balena-etcher-electron
这样安装完成后,你就可以正常使用Balena Etcher制作启动盘了。如果之后需要卸载,只需执行:
sudo apt remove balena-etcher-electron
备注:内容来源于stack exchange,提问作者Gleb

