saghul / lxd-alpine-builder

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

Mirror error #1

Closed mpgn closed 3 years ago

mpgn commented 6 years ago

Hello,

I try to run the script but it failed.

The script try to get http://mirrors.dotsrc.org/alpinev3.8/main/x86/APKINDEX.tar.gz but the real URL is http://mirrors.dotsrc.org/alpine/v3.8/main/x86/APKINDEX.tar.gz

root@kali:/tmp/lxd-alpine-builder# ./build-alpine -a i686
Determining the latest release... v3.8
Using static apk from http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.8/main/x86
Downloading alpine-keys-2.1-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'
Downloading apk-tools-static-2.10.0-r0.apk

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Downloading alpine-mirrors-3.5.9-r0.apk

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub: OK
Verified OK
Selecting mirror http://mirrors.dotsrc.org/alpinev3.8/main
fetch http://mirrors.dotsrc.org/alpinev3.8/main/x86/APKINDEX.tar.gz
ERROR: http://mirrors.dotsrc.org/alpinev3.8/main: No such file or directory
WARNING: Ignoring APKINDEX.a9fe933e.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  alpine-base (missing):
    required by: world[alpine-base]
Failed to install rootfs
pinpuk commented 5 years ago

Hey,

I had that issue too

./build-alpine -a i686 Determining the latest release... v3.8 Using static apk from http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.8/main/x86 Downloading alpine-keys-2.1-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' Downloading apk-tools-static-2.10.1-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-mirrors-3.5.9-r0.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://speglar.siminn.is/alpinev3.8/main fetch http://speglar.siminn.is/alpinev3.8/main/x86/APKINDEX.tar.gz ERROR: http://speglar.siminn.is/alpinev3.8/main: No such file or directory WARNING: Ignoring APKINDEX.b694d4df.tar.gz: No such file or directory ERROR: unsatisfiable constraints: alpine-base (missing): required by: world[alpine-base] Failed to install rootfs

My 2nd try : ./build-alpine -a i686 Determining the latest release... v3.8 Using static apk from http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.8/main/x86

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Failed to download a valid static apk

Run 3

./build-alpine -a i686 Determining the latest release... failed Failed to download a valid static apk

Run 4

./build-alpine -a i686 Determining the latest release... v3.8 Using static apk from http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.8/main/x86 Downloading alpine-keys-2.1-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' Downloading apk-tools-static-2.10.1-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-mirrors-3.5.9-r0.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://alpine.mirror.wearetriple.com/v3.8/main fetch http://alpine.mirror.wearetriple.com/v3.8/main/x86/APKINDEX.tar.gz (1/18) Installing musl (1.1.19-r10) (2/18) Installing busybox (1.28.4-r1) Executing busybox-1.28.4-r1.post-install (3/18) Installing alpine-baselayout (3.1.0-r0) Executing alpine-baselayout-3.1.0-r0.pre-install Executing alpine-baselayout-3.1.0-r0.post-install (4/18) Installing openrc (0.35.5-r4) Executing openrc-0.35.5-r4.post-install (5/18) Installing alpine-conf (3.8.0-r0) (6/18) Installing libressl2.7-libcrypto (2.7.4-r0) (7/18) Installing libressl2.7-libssl (2.7.4-r0) (8/18) Installing libressl2.7-libtls (2.7.4-r0) (9/18) Installing ssl_client (1.28.4-r1) (10/18) Installing zlib (1.2.11-r1) (11/18) Installing apk-tools (2.10.1-r0) (12/18) Installing busybox-suid (1.28.4-r1) (13/18) Installing busybox-initscripts (3.1-r3) Executing busybox-initscripts-3.1-r3.post-install (14/18) Installing scanelf (1.2.3-r0) (15/18) Installing musl-utils (1.1.19-r10) (16/18) Installing libc-utils (0.7.1-r0) (17/18) Installing alpine-keys (2.1-r1) (18/18) Installing alpine-base (3.8.1-r0) Executing busybox-1.28.4-r1.trigger OK: 7 MiB in 18 packages

now : ls /lxd-alpine-builder-master# ls alpine-v3.8-i686-20181012_1442.tar.gz build-alpine LICENSE README.md

saghul commented 5 years ago

I haven't used this project in quite a while... if any of you send a PR I'll be happy to merge it! :-)

tarzq306 commented 4 years ago

same problem please @saghul fix it

asp3n-hayley commented 4 years ago

I realize this is a bit outdated, but I see the problem, the directory structure of the source changed just a tiny bit, from ../alpinev3.12/.. to ../alpine/v3.12/.. I should be able to submit a PR and fix it, just need to read the code and make sure i don't screw up any of the variables in the process since the initial downloads worked fine

EDIT: As i read the OP's question more thoroughly, I see this was already stated. My apologies for the redundancy :D

asp3n-hayley commented 4 years ago

oooh....wait a minute....that can't be right. Some of the mirrors are nixing the slash between alpine and which results in a 404...but some of them work. Hmm

EDIT: more than half of the auto-selection mirrors don't work, I recommend rewriting the program to use several working mirrors rather than autoselecting

RussRascal commented 4 years ago

i've got a similar issue:

$sudo ./build-alpine Determining the latest release... v3.12 Using static apk from http://uk.alpinelinux.org/alpine//v3.12/main/x86_64 Downloading alpine-mirrors-3.5.10-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-keys-2.2-r0.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' Downloading apk-tools-static-2.10.5-r1.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' ERROR: checksum is missing for /home/rascal/Projects/THM/Game Server/lxd-alpine-builder/rootfs/sbin/apk.static.*.pub Failed to download a valid static apk

i've tried changing mirrors to see if its connected but no luck so far

any suggestions would be appreciated

547y4m commented 4 years ago

@RussRascal i also faced this same issue. But now i resolved it by my own. And may also help you!

1.) Run this command in your home directory - git clone https://github.com/saghul/lxd-alpine-builder.git 2.) Then this - sudo ./build-alpine 3.) If above command run properly without errors then congrats! 4.) If not maybe the error is due to mirror sites but it will create a rootfs directory in same folder i.e "lxd-alpine-builder" . 5.) Goto - cd/rootfs/usr/share/alpine-mirrors/Mirrors.txt 6.) Open that .txt file with any editor and remove all the mirror sites except first one, then save it there only. 7.) Again run - sudo ./build-alpine

Now it will work.

Hope it helps for everyone who is going through this issue.

RussRascal commented 4 years ago

@RussRascal i also faced this same issue. But now i resolved it by my own. And may also help you!

1.) Run this command in your home directory - git clone https://github.com/saghul/lxd-alpine-builder.git 2.) Then this - sudo ./build-alpine 3.) If above command run properly without errors then congrats! 4.) If not maybe the error is due to mirror sites but it will create a rootfs directory in same folder i.e "lxd-alpine-builder" . 5.) Goto - cd/rootfs/usr/share/alpine-mirrors/Mirrors.txt 6.) Open that .txt file with any editor and remove all the mirror sites except first one, then save it there only. 7.) Again run - sudo ./build-alpine

Now it will work.

Hi 547y4m,

thanks for the suggestion, i'd already tried that; just run through it again and the issue is slightly different, it now tells me there is no such file: tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading apk-tools-static-2.10.5-r1.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main fetch http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main/x86_64/APKINDEX.tar.gz ERROR: http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main: No such file or directory WARNING: Ignoring APKINDEX.64bf399d.tar.gz: No such file or directory ERROR: unsatisfiable constraints: alpine-base (missing): required by: world[alpine-base] Failed to install rootfs

it would appear that there is a wider issue with the alpine mirrors?

Thanks

RussRascal commented 4 years ago

@RussRascal i also faced this same issue. But now i resolved it by my own. And may also help you! 1.) Run this command in your home directory - git clone https://github.com/saghul/lxd-alpine-builder.git 2.) Then this - sudo ./build-alpine 3.) If above command run properly without errors then congrats! 4.) If not maybe the error is due to mirror sites but it will create a rootfs directory in same folder i.e "lxd-alpine-builder" . 5.) Goto - cd/rootfs/usr/share/alpine-mirrors/Mirrors.txt 6.) Open that .txt file with any editor and remove all the mirror sites except first one, then save it there only. 7.) Again run - sudo ./build-alpine Now it will work.

Hi 547y4m,

thanks for the suggestion, i'd already tried that; just run through it again and the issue is slightly different, it now tells me there is no such file: tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading apk-tools-static-2.10.5-r1.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main fetch http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main/x86_64/APKINDEX.tar.gz ERROR: http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main: No such file or directory WARNING: Ignoring APKINDEX.64bf399d.tar.gz: No such file or directory ERROR: unsatisfiable constraints: alpine-base (missing): required by: world[alpine-base] Failed to install rootfs

it would appear that there is a wider issue with the alpine mirrors?

Thanks

ok, scratch that, run the script 3 more times (more out of frustration than anything :-) ) and can see a new mirror being selected each time, 3rd time was the charm.

all ok

thanks for the help

asp3n-hayley commented 4 years ago

@RussRascal i also faced this same issue. But now i resolved it by my own. And may also help you! 1.) Run this command in your home directory - git clone https://github.com/saghul/lxd-alpine-builder.git 2.) Then this - sudo ./build-alpine 3.) If above command run properly without errors then congrats! 4.) If not maybe the error is due to mirror sites but it will create a rootfs directory in same folder i.e "lxd-alpine-builder" . 5.) Goto - cd/rootfs/usr/share/alpine-mirrors/Mirrors.txt 6.) Open that .txt file with any editor and remove all the mirror sites except first one, then save it there only. 7.) Again run - sudo ./build-alpine Now it will work.

Hi 547y4m, thanks for the suggestion, i'd already tried that; just run through it again and the issue is slightly different, it now tells me there is no such file: tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading apk-tools-static-2.10.5-r1.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main fetch http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main/x86_64/APKINDEX.tar.gz ERROR: http://ftp.acc.umu.se/mirror/alpinelinux.orgv3.12/main: No such file or directory WARNING: Ignoring APKINDEX.64bf399d.tar.gz: No such file or directory ERROR: unsatisfiable constraints: alpine-base (missing): required by: world[alpine-base] Failed to install rootfs it would appear that there is a wider issue with the alpine mirrors? Thanks

ok, scratch that, run the script 3 more times (more out of frustration than anything :-) ) and can see a new mirror being selected each time, 3rd time was the charm.

all ok

thanks for the help

Yeah that's what i had to do too haha, the author should pick a few working ones and ditch the autoselect algorithm. If i find the time I will with a PR, but y'know...time 😆

that said, when you edited the mirror file, the one you left was missing the forward slash between alpine and v3.12, so it most likely would have worked if you manually added it, or went to the root of the URL in a browser and manually navigated the dir until you got to the correct file, then copied that URL.

thenishkarshagarwal commented 4 years ago

@RussRascal i also faced this same issue. But now i resolved it by my own. And may also help you!

1.) Run this command in your home directory - git clone https://github.com/saghul/lxd-alpine-builder.git 2.) Then this - sudo ./build-alpine 3.) If above command run properly without errors then congrats! 4.) If not maybe the error is due to mirror sites but it will create a rootfs directory in same folder i.e "lxd-alpine-builder" . 5.) Goto - cd/rootfs/usr/share/alpine-mirrors/Mirrors.txt 6.) Open that .txt file with any editor and remove all the mirror sites except first one, then save it there only. 7.) Again run - sudo ./build-alpine

Now it will work.

that actually worked. worth the first try. this was the response: root@kali:~/Desktop/tryhackme/gamingserver/lxd-alpine-builder# ./build-alpine Determining the latest release... v3.12 Using static apk from http://dl-cdn.alpinelinux.org/alpine//v3.12/main/x86_64 Downloading alpine-mirrors-3.5.10-r0.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-keys-2.2-r0.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' Downloading apk-tools-static-2.10.5-r1.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-4a6a0840.rsa.pub: OK Verified OK Selecting mirror http://linorg.usp.br/AlpineLinux/v3.12/main fetch http://linorg.usp.br/AlpineLinux/v3.12/main/x86_64/APKINDEX.tar.gz (1/19) Installing musl (1.1.24-r9) (2/19) Installing busybox (1.31.1-r19) Executing busybox-1.31.1-r19.post-install (3/19) Installing alpine-baselayout (3.2.0-r7) Executing alpine-baselayout-3.2.0-r7.pre-install Executing alpine-baselayout-3.2.0-r7.post-install (4/19) Installing openrc (0.42.1-r11) Executing openrc-0.42.1-r11.post-install (5/19) Installing alpine-conf (3.9.0-r1) (6/19) Installing libcrypto1.1 (1.1.1g-r0) (7/19) Installing libssl1.1 (1.1.1g-r0) (8/19) Installing ca-certificates-bundle (20191127-r4) (9/19) Installing libtls-standalone (2.9.1-r1) (10/19) Installing ssl_client (1.31.1-r19) (11/19) Installing zlib (1.2.11-r3) (12/19) Installing apk-tools (2.10.5-r1) (13/19) Installing busybox-suid (1.31.1-r19) (14/19) Installing busybox-initscripts (3.2-r2) Executing busybox-initscripts-3.2-r2.post-install (15/19) Installing scanelf (1.2.6-r0) (16/19) Installing musl-utils (1.1.24-r9) (17/19) Installing libc-utils (0.7.2-r3) (18/19) Installing alpine-keys (2.2-r0) (19/19) Installing alpine-base (3.12.0-r0) Executing busybox-1.31.1-r19.trigger OK: 8 MiB in 19 packages

got the zip file at the end, thankyou.

YuriQS commented 4 years ago

I got the error with v3.12 ERROR: checksum is missing for /<my_path>/lxd-alpine-builder/rootfs/sbin/apk.static.*.pub with the command: sudo ./build-alpine

the solution for me was to comment the part needed to do the checksum from row 68 to 71 and i was able to get the tar.gz file, not the best idea skip the checksum but was the only way i found to make it work.

hope it helps

jomphatt commented 3 years ago

I have a similar problem with v3.13

Determining the latest release... v3.13 Using static apk from http://dl-cdn.alpinelinux.org/alpine//v3.13/main/x86_64 Downloading apk-tools-static-2.12.0-r4.apk tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' tar: Ignoring unknown extended header keyword 'APK-TOOLS.checksum.SHA1' Downloading alpine-keys-2.2-r0.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' alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub: OK Verified OK wc: /opt/lxd-alpine-builder/rootfs/usr/share/alpine-mirrors/MIRRORS.txt: No such file or directory sed: -e expression #1, char 2: invalid usage of line address 0 Selecting mirror /v3.13/main WARNING: Ignoring /v3.13/main: No such file or directory ERROR: unable to select packages: alpine-base (no such package): required by: world[alpine-base] Failed to install rootfs

Has anyone run into the same problem? I followed every solutions commented here and none of them worked.

Mathunter2 commented 3 years ago

same issue as @jomphatt. Maybe due to version 3.13 released in the beginning of January 2021. Total absence of the mirrors.txt file in /rootfs resulting in the incapacity of downloading packages and therefore building.

dawsonpaul commented 3 years ago

Create the directory and mirrors file with the following - http://dl-cdn.alpinelinux.org/alpine/MIRRORS.txt

You may need to run the ./build-alpine a couple of times until it selects and working mirror.

This was the winner for me - http://mirror.ps.kz/alpine//v3.13/main

"Insufficient facts always invite danger." - spok

jomphatt commented 3 years ago

Create the directory and mirrors file with the following - http://dl-cdn.alpinelinux.org/alpine/MIRRORS.txt

You may need to run the ./build-alpine a couple of times until it selects and working mirror.

This was the winner for me - http://mirror.ps.kz/alpine//v3.13/main

"Insufficient facts always invite danger." - spok

I tried this and it worked! I really appreciate your help, @dawsonpaul .

Mathunter2 commented 3 years ago

worked fine ! Thanks @dawsonpaul

Mchzks commented 3 years ago

Create the directory and mirrors file with the following - http://dl-cdn.alpinelinux.org/alpine/MIRRORS.txt

You may need to run the ./build-alpine a couple of times until it selects and working mirror.

This was the winner for me - http://mirror.ps.kz/alpine//v3.13/main

"Insufficient facts always invite danger." - spok

Thanks!

Thura98 commented 3 years ago

Hi all,

I managed to fix the error using this method, hope it help you guys as well. I was using Kali linux version 2020.3.

  1. Go into rootfs/use/share directory cd rootfs/usr/share/

  2. Create the alpine-mirrors directory mkdir alpine-mirrors

  3. Go into the alpine-mirrors directory, create a file called MIRRORS.txt cd alpine-mirrors/ vi MIRRORS.txt

  4. Add in the following link into MIRRORS.txt file http://alpine.mirror.wearetriple.com

  5. Save the MIRRORS.txt file and then run the build-alpine again. sudo ./build-alpine

This should fix the error.

walkeraj1984 commented 3 years ago

Hi all,

I managed to fix the error using this method, hope it help you guys as well. I was using Kali linux version 2020.3.

1. Go into rootfs/use/share directory
   `cd rootfs/usr/share/`

2. Create the alpine-mirrors directory
   `mkdir alpine-mirrors`

3. Go into the alpine-mirrors directory, create a file called MIRRORS.txt
   `cd alpine-mirrors/`
   `vi MIRRORS.txt`

4. Add in the following link into MIRRORS.txt file
   `http://alpine.mirror.wearetriple.com`

5. Save the MIRRORS.txt file and then run the build-alpine again.
   `sudo ./build-alpine`

This should fix the error.

The above method was the same way I fixed it too. Just run the ./build-alpine once and let it fail then follow the created directories into rootfs/usr/share and mkdir alpine-mirrors. cd into that and another method is to just curl ftp.acc.umu.se/mirror/alpinelinux.org/MIRRORS.txt -o MIRRORS.txt while in the newly created directory, then run the ./build-alpine again in the base folder. SIDENOTE: it classically can take a couple of tries of running the ./build-alpine once the mirrors are connecting properly as it will sometimes fail the first time but then the next time will try another working mirror and succeed in my experience anyway