我目前正在为一个ARM设备(即Odroid C1+)设置自己的Ubuntu 16.04映像。因为我想定制运行良好的最小Ubuntu,所以我想安装“zookeeperd”包。

sudo apt-get install zookeeperd

执行此操作时,将出现以下错误:
sudo: unable to resolve host dualboot
Reading package lists... Done
Building dependency tree
Reading state information... Done
zookeeperd is already the newest version (3.4.8-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Setting up ca-certificates-java (20160321) ...
the keytool command requires a mounted proc fs (/proc).
dpkg: error processing package ca-certificates-java (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-8-jre-headless:armhf:
 openjdk-8-jre-headless:armhf depends on ca-certificates-java; however:
  Package ca-certificates-java is not configured yet.

dpkg: error processing package openjdk-8-jre-headless:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jre:armhf:
 openjdk-8-jre:armhf depends on openjdk-8-jre-headless (= 8u131-b11-0ubuntu1.16.04.2); however:
  Package openjdk-8-jre-headless:armhf is not configured yet.

dpkg: error processing package openjdk-8-jre:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zookeeper:
 zookeeper depends on default-jre-headless | java6-runtime-headless; however:
  Package default-jre-headless is not installed.
  Package java6-runtime-headless is not installed.
  Package openjdk-8-jre-headless:armhf which provides java6-runtime-headless is not configured yet.

dpkg: error processing package zookeeper (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zookeeperd:
 zookeeperd depends on zookeeper (= 3.4.8-1); however:
  Package zookeeper is not configured yet.

dpkg: error processing package zookeeperd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jre-jamvm:armhf:
 openjdk-8-jre-jamvm:armhf depends on openjdk-8-jre-headless (= 8u131-b11-0ubuntu1.16.04.2); however:
  Package openjdk-8-jre-headless:armhf is not configured yet.

dpkg: error processing package openjdk-8-jre-jamvm:armhf (--configure):
 dependency problems - leaving unconfigured
Processing triggers for ca-certificates (20160104ubuntu1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

the keytool command requires a mounted proc fs (/proc).
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
 ca-certificates-java
 openjdk-8-jre-headless:armhf
 openjdk-8-jre:armhf
 zookeeper
 zookeeperd
 openjdk-8-jre-jamvm:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

您是否也经历过同样的情况,或者知道如何解决错误?我发现类似的东西是:Error installing JDK: the keytool command requires a mounted proc fs (/proc). Windows subsystem for Linux
但我想澄清的是,我既没有在Windows 10的Linux子系统上工作,也没有在虚拟机上工作!

最佳答案

解决方案如下:https://superuser.com/questions/165116/mount-dev-proc-sys-in-a-chroot-environment
只需执行以下操作:
在主机中:

  mount --bind /proc <chroot dir>/proc

以及另一种语法(在chroot环境中):
  mount -t proc none /proc

关于java - 在CHROOT环境中工作-尝试安装JDK时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44571510/

10-13 01:59