alpinelinux / alpine-chroot-install

Install Alpine Linux in chroot with a breeze. Build ARM on Travis CI or any other x86_64 CI.
MIT License
290 stars 59 forks source link

Does not behave correctly on freshly installed Ubuntu 16.04 #3

Closed znoxx closed 4 years ago

znoxx commented 7 years ago

It tries to install qemu-user-static from zesty, after this installation of binmft-support fails (no package ?)

To workaround - install qemu-user-static from normal system repository, it will install binfmt-support. After this qemu-user static will be updated to needed version.

jirutka commented 7 years ago

Could you please paste a log here?

znoxx commented 7 years ago

This is a fresh install on LTS:

 sudo ./alpine-chroot-install -a armhf -p linux-headers

> Installing qemu-user-static on host system...
> Package qemu-user-static available for your system is too old (2.5+dfsg-5ubuntu10.14)
> Installing newer version from repository of ubuntu zesty...

then:
Reading package lists...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Recommended packages:
  binfmt-support
The following NEW packages will be installed:
  qemu-user-static
0 upgraded, 1 newly installed, 0 to remove and 1345 not upgraded.
Need to get 0 B/7 115 kB of archives.
After this operation, 93,7 MB of additional disk space will be used.
Selecting previously unselected package qemu-user-static.
(Reading database ... 175952 files and directories currently installed.)
Preparing to unpack .../qemu-user-static_1%3a2.8+dfsg-3ubuntu2_amd64.deb ...
Unpacking qemu-user-static (1:2.8+dfsg-3ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up qemu-user-static (1:2.8+dfsg-3ubuntu2) ...

> Installing and enabling binfmt-support on host system...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package binfmt-support is a virtual package provided by:
  binfmt-support:i386 2.1.6-2 [Not candidate version]

E: Package 'binfmt-support' has no installation candidate
ERROR: Failed to install binfmt-support using apt-get!

However, attempt to install

~$ sudo apt-get install binfmt-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package binfmt-support is a virtual package provided by:
  binfmt-support:i386 2.1.6-2 [Not candidate version]

E: Package 'binfmt-support' has no installation candidate

But when I remove qemu-user-static, then sudo rm /etc/apt/sources.list.d/ubuntu-zesty.list

Then

sudo apt-get update
sudo apt-get install binfmt-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  binfmt-support
0 upgraded, 1 newly installed, 0 to remove and 253 not upgraded.
Need to get 0 B/50,7 kB of archives.
After this operation, 206 kB of additional disk space will be used.

It works.

Not sure it is good idea to hack repositories, especially in LTS system. May be it makes sense to install binfmt-support first, then add repo from zesty, then install qemu-user-static, then remove repo and refresh cache. In this case system will be cleaner.

DDoSolitary commented 6 years ago

Also reproduced on a clean install of Ubuntu 14.04, but only when binfmt-support isn't installed before running alpine-chroot-install. The script works on Travis CI simply because its build environment has binfmt-support already installed.

jirutka commented 4 years ago

Ubuntu 14 is not relevant anymore, so I can close this issue.