![将所有包和依赖项从一台电脑复制到另一台电脑](https://linux22.com/image/886616/%E5%B0%86%E6%89%80%E6%9C%89%E5%8C%85%E5%92%8C%E4%BE%9D%E8%B5%96%E9%A1%B9%E4%BB%8E%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E5%A4%8D%E5%88%B6%E5%88%B0%E5%8F%A6%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91.png)
我已经下载并安装了运行我的软件(定制的 GUI 软件)所需的所有依赖项和 .deb 包。现在,在另一个系统上,我安装了相同的 ubuntu 版本,但它没有连接到互联网。因此,我从外部下载并尝试安装 .deb 包,但出现以下错误。
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgsl0-dev:i386:
libgsl0-dev:i386 depends on libgsl0ldbl (= 1.15+dfsg-1build1).
dpkg: error processing libgsl0-dev:i386 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libopenscenegraph-dev:i386:
libopenscenegraph-dev:i386 depends on libopenthreads-dev.
libopenscenegraph-dev:i386 depends on libgl1-mesa-dev | libgl-dev.
libopenscenegraph-dev:i386 depends on libglu-dev.
libopenscenegraph-dev:i386 depends on libopenscenegraph80 (= 3.0.1-2).
dpkg: error processing libopenscenegraph-dev:i386 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libosgearth-dev:i386:
libosgearth-dev:i386 depends on libopenscenegraph-dev; however:
Package libopenscenegraph-dev:i386 is not configured yet.
libosgearth-dev:i386 depends on libgeos-dev; however:
Package libgeos-dev:i386 is not configured yet.
每个软件包的错误都一样,所有依赖项都一样。我已经在一台电脑上安装了所有 deb。软件包和依赖项。所以我的问题是,如何复制所有相同的内容并安装在未连接到互联网的其他电脑上。这可能吗?
答案1
您可以通过手动安装包来解决依赖性问题dpkg -i --force-depends <PathToPackageNameThatBlocks.deb>
。
因为您说第二台机器没有互联网连接,所以您可以debmirror
在第一台机器上试用该工具。然后可以将创建的镜像复制到第二台机器并包含在您的/etc/apt/sources.list
for中apt-get
。
man debmirror
在命令行中输入即可找到该工具的说明和手册。