我正在尝试安装 Minecraft,并运行命令,它显示如下:
stress@penguin:~$ sudo dpkg -i Minecraft.deb
(Reading database ... 33346 files and directories currently installed.)
Preparing to unpack Minecraft.deb ...
Unpacking minecraft-launcher (928) over (928) ...
dpkg: dependency problems prevent configuration of minecraft-launcher:
minecraft-launcher depends on default-jre; however:
Package default-jre is not installed.
minecraft-launcher depends on libnspr4 (>= 2:4.9-2~); however:
Package libnspr4 is not installed.
minecraft-launcher depends on libnss3 (>= 2:3.22); however:
Package libnss3 is not installed.
dpkg: error processing package minecraft-launcher (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
minecraft-launcher
stress@penguin:~$
(我包含了我输入的代码行)
答案1
您正在尝试Minecraft.deb
在本地安装,正如您所知,它具有多个依赖项。dpkg
无法解决依赖关系,这就是您收到错误的原因。
安装它的唯一方法dpkg
是下载deb
所有依赖项的文件并按顺序安装它们。不用说,您不想陷入这样的乏味之中。
要从deb
文件安装 Minecraft,请使用具有 sudoer 权限的命令apt install /path/to/Minecraft.deb
.这将让它知道您正在从本地deb
文件安装 Minecraft,这样它就不会尝试从存储库获取它,同时也从存储库安装依赖项本身。