LINUX.ORG.RU

Сборка образа Debian

 , , ,


1

1

Собираю образ Debian для A20 и вот доходит до установки Java из PPA и ступор. Собираю в Докере через debootstrap. Раньше ругалась на отсутствие /dev /proc /sys в чруте. Примонтировал их и стало вот так.

$ mount -o bind /dev $ROOTFS_DIR/dev
$ mount -o bind /dev/pts $ROOTFS_DIR/dev/pts
$ chroot $ROOTFS_DIR /bin/bash -x /root/scripts/run.sh
+ mkdir -p /proc
+ mkdir -p /sys
+ mount -t proc proc /proc
+ mount -t sysfs sys /sys
+ tee /etc/apt/sources.list.d/webupd8team-java.list
+ echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main'
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
+ tee -a /etc/apt/sources.list.d/webupd8team-java.list
+ echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main'
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.JcnNPibpS7 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ apt-get update
Hit http://security.debian.org jessie/updates InRelease
Get:1 http://ppa.launchpad.net xenial InRelease [17.6 kB]
Ign http://http.debian.net jessie InRelease
Get:2 http://http.debian.net jessie-updates InRelease [145 kB]
Get:3 http://http.debian.net jessie Release.gpg [2373 B]
Hit http://security.debian.org jessie/updates/main Sources
Hit http://http.debian.net jessie Release
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://security.debian.org jessie/updates/non-free Sources
Hit http://security.debian.org jessie/updates/main armhf Packages
Hit http://security.debian.org jessie/updates/contrib armhf Packages
Hit http://security.debian.org jessie/updates/non-free armhf Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://security.debian.org jessie/updates/non-free Translation-en
Get:4 http://ppa.launchpad.net xenial/main Sources [1400 B]
Get:5 http://ppa.launchpad.net xenial/main armhf Packages [2860 B]
Get:6 http://ppa.launchpad.net xenial/main Translation-en [1260 B]
Hit http://http.debian.net jessie-updates/main Sources
Hit http://http.debian.net jessie-updates/contrib Sources
Hit http://http.debian.net jessie-updates/non-free Sources
Get:7 http://http.debian.net jessie-updates/main armhf Packages/DiffIndex [6424 B]
Hit http://http.debian.net jessie-updates/contrib armhf Packages
Get:8 http://http.debian.net jessie-updates/non-free armhf Packages/DiffIndex [736 B]
Get:9 http://http.debian.net jessie-updates/contrib Translation-en [14 B]
Get:10 http://http.debian.net jessie-updates/main Translation-en/DiffIndex [2704 B]
Hit http://http.debian.net jessie/main Sources
Get:11 http://http.debian.net jessie-updates/non-free Translation-en/DiffIndex [736 B]
Hit http://http.debian.net jessie/contrib Sources
Hit http://http.debian.net jessie/non-free Sources
Hit http://http.debian.net jessie/main armhf Packages
Hit http://http.debian.net jessie/contrib armhf Packages
Hit http://http.debian.net jessie/non-free armhf Packages
Get:12 http://http.debian.net jessie/contrib Translation-en [38.5 kB]
Get:13 http://http.debian.net jessie/main Translation-en [4583 kB]
Get:14 http://http.debian.net jessie/non-free Translation-en [72.3 kB]
Fetched 4875 kB in 21s (232 kB/s)
Reading package lists...
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt install -y oracle-java8-installer

WARNING: /usr/bin/apt does not have a stable CLI interface yet. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  binutils java-common
Suggested packages:
  binutils-doc default-jre equivs binfmt-support visualvm ttf-baekmuk
  ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic
  ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming firefox firefox-2
  iceweasel mozilla-firefox iceape-browser mozilla-browser epiphany-gecko
  epiphany-webkit epiphany-browser galeon midbrowser moblin-web-browser
  xulrunner xulrunner-1.9 konqueror chromium-browser midori google-chrome
Recommended packages:
  gsfonts-x11 oracle-java8-set-default
The following NEW packages will be installed:
  binutils java-common oracle-java8-installer
0 upgraded, 3 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 3692 kB of archives.
After this operation, 18.1 MB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu/ xenial/main oracle-java8-installer all 8u111+8u111arm-1~webupd8~0 [23.5 kB]
Get:2 http://http.debian.net/debian/ jessie/main binutils armhf 2.25-5 [3533 kB]
Get:3 http://http.debian.net/debian/ jessie/main java-common all 0.52 [136 kB]
Preconfiguring packages ...
Fetched 3692 kB in 1s (1964 kB/s)
Selecting previously unselected package binutils.

(Reading database ... 
(Reading database ... 100%
(Reading database ... 16155 files and directories currently installed.)

Preparing to unpack .../binutils_2.25-5_armhf.deb ...

Unpacking binutils (2.25-5) ...

Selecting previously unselected package java-common.

Preparing to unpack .../java-common_0.52_all.deb ...

Unpacking java-common (0.52) ...

Processing triggers for man-db (2.7.0.2-5) ...

Setting up binutils (2.25-5) ...

Processing triggers for libc-bin (2.19-18+deb8u6) ...

Selecting previously unselected package oracle-java8-installer.

(Reading database ... 
(Reading database ... 5%
(Reading database ... 100%
(Reading database ... 16438 files and directories currently installed.)

Preparing to unpack .../oracle-java8-installer_8u111+8u111arm-1~webupd8~0_all.deb ...

dpkg: error processing archive /var/cache/apt/archives/oracle-java8-installer_8u111+8u111arm-1~webupd8~0_all.deb (--unpack):

 subprocess new pre-installation script returned error exit status 1

Errors were encountered while processing:

 /var/cache/apt/archives/oracle-java8-installer_8u111+8u111arm-1~webupd8~0_all.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

Подскажите, чего он от меня хочет, что за ошибка 1?

Ответ на: комментарий от ving2

Нужна Oracle Java, ее в репах нету. Но я уже починил. Проблема в странном поведении readelf была.

readelf -A /proc/self/exe
Везде, где я тестил, ничего не возвращал, а в Debian под ARM он возвращал корректные результаты. Заменил его на бинарник cp и прокатило.

Confucij ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.