saghul / lxd-alpine-builder

Build Alpine Linux images for LXD
GNU Lesser General Public License v2.1
173 stars 49 forks source link

Can't build build-alpine #9

Open Mat1212fr opened 1 year ago

Mat1212fr commented 1 year ago

I just can't build the lxd-alpine-builder. I'm on a WSL Kali-Linux (could that be the problem?) and I'm cloning the repo and building it. Here are the errors:

┌──(root㉿PC-Mat1212)-[/home/hero/lxd-alpine-builder]
└─# ./build-alpine
Determining the latest release... v3.18
Using static apk from http://dl-cdn.alpinelinux.org/alpine//v3.18/main/x86_64
Downloading alpine-keys-2.4-r1.apk
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
Downloading apk-tools-static-2.14.0-r2.apk
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1'
alpine-devel@lists.alpinelinux.org-6165ee59.rsa.pub: OK
Verified OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2652  100  2652    0     0   3393      0 --:--:-- --:--:-- --:--:--  3391
--2023-06-22 21:50:53--  http://alpine.mirror.wearetriple.com/MIRRORS.txt
Resolving alpine.mirror.wearetriple.com (alpine.mirror.wearetriple.com)... 93.187.10.106, 2a00:1f00:dc06:10::106
Connecting to alpine.mirror.wearetriple.com (alpine.mirror.wearetriple.com)|93.187.10.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2652 (2.6K) [text/plain]
Saving to: ‘/home/hero/lxd-alpine-builder/rootfs/usr/share/alpine-mirrors/MIRRORS.txt’

/home/hero/lxd-alpine-builder/rootfs/u 100%[============================================================================>]   2.59K  --.-KB/s    in 0s

2023-06-22 21:50:53 (291 MB/s) - ‘/home/hero/lxd-alpine-builder/rootfs/usr/share/alpine-mirrors/MIRRORS.txt’ saved [2652/2652]

./build-alpine: 91: hexdump: not found
expr: syntax error: unexpected argument ‘72’
Selecting mirror http://dl-cdn.alpinelinux.org/alpine/
http://uk.alpinelinux.org/alpine/
http://mirror.yandex.ru/mirrors/alpine/
http://mirrors.gigenet.com/alpinelinux/
http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/
http://mirror.leaseweb.com/alpine/
http://mirror.fel.cvut.cz/alpine/
http://alpine.mirror.far.fi/
http://alpine.mirror.wearetriple.com/
http://mirror.clarkson.edu/alpine/
http://mirror.aarnet.edu.au/pub/alpine
http://mirrors.dotsrc.org/alpine/
http://ftp.halifax.rwth-aachen.de/alpine/
http://mirrors.tuna.tsinghua.edu.cn/alpine/
http://mirrors.ustc.edu.cn/alpine/
http://mirrors.nju.edu.cn/alpine/
http://mirror.lzu.edu.cn/alpine/
http://ftp.acc.umu.se/mirror/alpinelinux.org/
http://mirror.xtom.com.hk/alpine/
http://mirror.csclub.uwaterloo.ca/alpine/
http://alpinelinux.mirror.iweb.com/
http://pkg.adfinis.com/alpine/
http://mirror.ps.kz/alpine/
http://mirror.rise.ph/alpine-linux/
http://mirrors.ircam.fr/pub/alpine/
http://mirror.math.princeton.edu/pub/alpinelinux/
http://mirrors.sjtug.sjtu.edu.cn/alpine/
http://ftp.icm.edu.pl/pub/Linux/distributions/alpine/
http://mirror.ungleich.ch/mirror/packages/alpine/
http://mirrors.edge.kernel.org/alpine/
http://ap.edge.kernel.org/alpine/
http://eu.edge.kernel.org/alpine/
http://download.nus.edu.sg/mirror/alpine/
http://alpine.yourlabs.org
http://mirror.pit.teraswitch.com/alpine
http://mirror.reenigne.net/alpine/
http://quantum-mirror.hu/mirrors/pub/alpine/
http://tux.rainside.sk/alpine/
http://alpine.cs.nycu.edu.tw/
http://mirror.ihost.md/alpine/
http://mirror.ette.biz/alpine/
http://mirror.lagoon.nc/alpine/
http://alpinelinux.c3sl.ufpr.br
http://foobar.turbo.net.id/alpine/
http://alpine.ccns.ncku.edu.tw/alpine/
http://mirror.dst.ca/alpine
http://mirror.kumi.systems/alpine
http://mirror.sabay.com.kh/alpine/
http://alpine.northrepo.ca
http://mirrors.ocf.berkeley.edu/alpine/
http://mirrors.pardisco.co/alpine/
http://mirrors.aliyun.com/alpine/
http://mirror.alwyzon.net/alpine/
http://mirror1.ku.ac.th/alpine/
http://mirrors.bfsu.edu.cn/alpine
http://ftpmirror2.infania.net/mirror/alpine/
http://repo.iut.ac.ir/repo/alpine
http://mirror.fcix.net/alpine/
http://alpine.sakamoto.pl/alpine/
http://mirror.2degrees.nz/alpine/
http://mirror.kku.ac.th/alpine
http://mirror.uepg.br/alpine
http://alpine.astra.in.ua
http://mirrors.neusoft.edu.cn/alpine/
http://ftp.udx.icscoe.jp/Linux/alpine/
http://alpinelinux.mirror.garr.it/
http://mirrors.hostico.ro/alpinelinux/
http://mirrors.qontinuum.space/alpinelinux
http://ftp.lysator.liu.se/pub/alpine/
http://mirrors.zju.edu.cn/alpine/
http://mirror.mangohost.net/alpine/
http://mirror.bahnhof.net/pub/alpinelinux/
http://mirror.vinehost.net/alpine//v3.18/main
fetch http://dl-cdn.alpinelinux.org/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://dl-cdn.alpinelinux.org/alpine/: No such file or directory
fetch http://uk.alpinelinux.org/alpine/x86_64/APKINDEX.tar.gz
WARNING: Permanently redirected to https://uk.alpinelinux.org:443/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://uk.alpinelinux.org/alpine/: No such file or directory
fetch http://mirror.yandex.ru/mirrors/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.yandex.ru/mirrors/alpine/: No such file or directory
fetch http://mirrors.gigenet.com/alpinelinux/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.gigenet.com/alpinelinux/: No such file or directory
fetch http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/: No such file or directory
fetch http://mirror.leaseweb.com/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.leaseweb.com/alpine/: No such file or directory
fetch http://mirror.fel.cvut.cz/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.fel.cvut.cz/alpine/: No such file or directory
fetch http://alpine.mirror.far.fi/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://alpine.mirror.far.fi/: No such file or directory
fetch http://alpine.mirror.wearetriple.com/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://alpine.mirror.wearetriple.com/: No such file or directory
fetch http://mirror.clarkson.edu/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.clarkson.edu/alpine/: No such file or directory
fetch http://mirror.aarnet.edu.au/pub/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.aarnet.edu.au/pub/alpine: No such file or directory
fetch http://mirrors.dotsrc.org/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.dotsrc.org/alpine/: No such file or directory
fetch http://ftp.halifax.rwth-aachen.de/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://ftp.halifax.rwth-aachen.de/alpine/: No such file or directory
fetch http://mirrors.tuna.tsinghua.edu.cn/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.tuna.tsinghua.edu.cn/alpine/: No such file or directory
fetch http://mirrors.ustc.edu.cn/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.ustc.edu.cn/alpine/: No such file or directory
fetch http://mirrors.nju.edu.cn/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.nju.edu.cn/alpine/: No such file or directory
fetch http://mirror.lzu.edu.cn/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.lzu.edu.cn/alpine/: No such file or directory
fetch http://ftp.acc.umu.se/mirror/alpinelinux.org/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://ftp.acc.umu.se/mirror/alpinelinux.org/: No such file or directory
fetch http://mirror.xtom.com.hk/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.xtom.com.hk/alpine/: No such file or directory
fetch http://mirror.csclub.uwaterloo.ca/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.csclub.uwaterloo.ca/alpine/: No such file or directory
fetch http://alpinelinux.mirror.iweb.com/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://alpinelinux.mirror.iweb.com/: No such file or directory
fetch http://pkg.adfinis.com/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://pkg.adfinis.com/alpine/: No such file or directory
fetch http://mirror.ps.kz/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.ps.kz/alpine/: No such file or directory
fetch http://mirror.rise.ph/alpine-linux/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.rise.ph/alpine-linux/: No such file or directory
fetch http://mirrors.ircam.fr/pub/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.ircam.fr/pub/alpine/: No such file or directory
fetch http://mirror.math.princeton.edu/pub/alpinelinux/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.math.princeton.edu/pub/alpinelinux/: No such file or directory
fetch http://mirrors.sjtug.sjtu.edu.cn/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.sjtug.sjtu.edu.cn/alpine/: No such file or directory
fetch http://ftp.icm.edu.pl/pub/Linux/distributions/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://ftp.icm.edu.pl/pub/Linux/distributions/alpine/: No such file or directory
fetch http://mirror.ungleich.ch/mirror/packages/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirror.ungleich.ch/mirror/packages/alpine/: No such file or directory
fetch http://mirrors.edge.kernel.org/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://mirrors.edge.kernel.org/alpine/: No such file or directory
fetch http://ap.edge.kernel.org/alpine/x86_64/APKINDEX.tar.gz
WARNING: updating and opening http://ap.edge.kernel.org/alpine/: No such file or directory
ERROR: unable to select packages:
  alpine-base (no such package):
    required by: world[alpine-base]
Failed to install rootfs

┌──(root㉿PC-Mat1212)-[/home/hero/lxd-alpine-builder]
└─#

I don't know about this thing and I see kind of this output this in other Github issues but they don't help me. Any solutions ?

saghul commented 1 year ago

Sorry I have no idea. I haven't used it in many years TBH. I will apply any patches anyone can come up with to improve it, however.

jobroche commented 1 week ago

Here's how I fixed it:

cd rootfs/usr/share/alpine-mirrors
sudo nano MIRRORS.txt

Input a mirror with version 3.8, list of mirrors: I used the following mirror: https://dl-cdn.alpinelinux.org/alpine/v3.8

comment out the following line within the build-alpine script

#wget http://alpine.mirror.wearetriple.com/MIRRORS.txt -O $rootfs/usr/share/alpine-mirrors/MIRRORS.txt

execute the script again and enjoy :)

sudo ./build-alphine