ubuntu - Gentoo + debootstrap 在与 fakeroot 和 fakechroot 一起使用时失败

标签 ubuntu debian bootstrapper chroot gentoo

我正在使用 Gentoo box,我想创建基于 Debian 的 chroot 环境而不使用 root 帐户或 sudo

这似乎可以使用 fakerootfakechroot 等工具,但到目前为止我还没有成功。这是我用于 Precise 的命令:

fakeroot fakechroot /usr/sbin/debootstrap --variant=fakechroot precise ./precise http://archive.ubuntu.com/ubuntu/

它总是以同样的错误失败:

I: Installing core packages...
W: Failure trying to run: chroot precise dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb
W: See precise/debootstrap/debootstrap.log for details

debootstrap.log的内容是:

dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

我不知道为什么要引入 SELinux 以及为什么它没有正确处理这种依赖性。另外,我也尝试构建 Wheezy 和 Jessie。同样的错误。

这是怎么回事?版本:

debootstrap-1.0.67

fakeroot-1.19

fakechroot-2.17.2

kernel-3.19.6

最佳答案

fakeroot 和 fakechroot 不是这里的问题。看起来像最初构建 dpkg 时使用了 libselinux.so.1。首先,尝试定位命令:

locate libselinux

没有版本。这应该 1) 确认它确实不存在,或者 2) 它确实存在,但不在您的 $LD_LIBRARY_PATH 或默认库搜索路径中。

如果找到另一个版本,请使用 ln -s 命令创建符号链接(symbolic link) (libselinux.so.1),指向您现有的版本。

要查看依赖关系,请运行:

ldd `which dpkg`

关于ubuntu - Gentoo + debootstrap 在与 fakeroot 和 fakechroot 一起使用时失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30158590/

相关文章:

unix - 生成行开头的命令行

node.js - 在 Ubuntu 上安装 Node.js

php - 无法安装旧版本的php

linux - 在容器中运行 apt update && apt install -y sudo 失败

linux - Netstat 阻止了我的减速?

wix - WiX中Burn/bootstrapper的命令行标志/选项的完整列表

WiX Bootstrapper : skip bootstrapper UI, 首先显示 MSI 对话框

mysql - 如何从shell脚本将diff.sql应用到mysql数据库

linux - 使用 Ant 复制到受限文件夹(在 Ubuntu 中使用 Eclipse)

.net - NetFx45WebLink 和 NetFx45RedistLink 有什么区别