Install apk tool on Alpine Linux
I'm fiddling with a Docker image, built from a Virtualbox VM using Packer. The image is Alpine Linux 5.3.0, but apk seems to have been removed.
How can I reinstall apk, or build it from source? Googling seems only to yield results on people installing packages, or Android apps!
alpine-linux apk-tools
migrated from serverfault.com Jan 20 '17 at 19:41
This question came from our site for system and network administrators.
add a comment |
I'm fiddling with a Docker image, built from a Virtualbox VM using Packer. The image is Alpine Linux 5.3.0, but apk seems to have been removed.
How can I reinstall apk, or build it from source? Googling seems only to yield results on people installing packages, or Android apps!
alpine-linux apk-tools
migrated from serverfault.com Jan 20 '17 at 19:41
This question came from our site for system and network administrators.
add a comment |
I'm fiddling with a Docker image, built from a Virtualbox VM using Packer. The image is Alpine Linux 5.3.0, but apk seems to have been removed.
How can I reinstall apk, or build it from source? Googling seems only to yield results on people installing packages, or Android apps!
alpine-linux apk-tools
I'm fiddling with a Docker image, built from a Virtualbox VM using Packer. The image is Alpine Linux 5.3.0, but apk seems to have been removed.
How can I reinstall apk, or build it from source? Googling seems only to yield results on people installing packages, or Android apps!
alpine-linux apk-tools
alpine-linux apk-tools
edited Jan 20 '17 at 22:50
Gilles
531k12810631591
531k12810631591
asked Jan 20 '17 at 16:45
EngineerBetter_DJEngineerBetter_DJ
1064
1064
migrated from serverfault.com Jan 20 '17 at 19:41
This question came from our site for system and network administrators.
migrated from serverfault.com Jan 20 '17 at 19:41
This question came from our site for system and network administrators.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Probably you mean v3.5.0.
The easier way is (if your architecture is x86_64):
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r1.apk
And then unpack the downloaded file:
tar -zxvf apk-tools-static-2.6.8-r1.apk
You'll find in the unpacked apk the apk.static file, that you can use to install apk-tools.
More info here: https://wiki.alpinelinux.org/wiki/Upgrading_Alpine
Of course, if your architecture is x86, the url is:
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86/apk-tools-static-2.6.8-r1.apk
Anyway, the package you need is "apk-tools".
add a comment |
One addition to Francesco's answer (since I don't have the reputation to comment yet):
You may need to use the curl command with the -o flag instead of wget, depending on how your container is configured. (If you get a wget: command not found message, that's probably a good fallback.)
===
Edit: Also, it looks from the "packages" page like they may have removed this minor version in favor of 2.6.9:
https://pkgs.alpinelinux.org/packages?name=apk-tools-static&branch=&repo=&arch=&maintainer=
... so the command set I ended up using was more like:
curl -o apk-tools-static-2.6.8-r1.apk http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.9-r0.apk
tar -zxvf apk-tools-static-2.6.8-r1.apk
cd sbin
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted --initdb add apk-tools-static
sudo apk.static update
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools
sudo apk update
... etc.,.
Usual disclaimer: If you can run things without using sudo, you really should do that. My situation is not your situation. Try everything without sudo first.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338962%2finstall-apk-tool-on-alpine-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Probably you mean v3.5.0.
The easier way is (if your architecture is x86_64):
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r1.apk
And then unpack the downloaded file:
tar -zxvf apk-tools-static-2.6.8-r1.apk
You'll find in the unpacked apk the apk.static file, that you can use to install apk-tools.
More info here: https://wiki.alpinelinux.org/wiki/Upgrading_Alpine
Of course, if your architecture is x86, the url is:
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86/apk-tools-static-2.6.8-r1.apk
Anyway, the package you need is "apk-tools".
add a comment |
Probably you mean v3.5.0.
The easier way is (if your architecture is x86_64):
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r1.apk
And then unpack the downloaded file:
tar -zxvf apk-tools-static-2.6.8-r1.apk
You'll find in the unpacked apk the apk.static file, that you can use to install apk-tools.
More info here: https://wiki.alpinelinux.org/wiki/Upgrading_Alpine
Of course, if your architecture is x86, the url is:
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86/apk-tools-static-2.6.8-r1.apk
Anyway, the package you need is "apk-tools".
add a comment |
Probably you mean v3.5.0.
The easier way is (if your architecture is x86_64):
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r1.apk
And then unpack the downloaded file:
tar -zxvf apk-tools-static-2.6.8-r1.apk
You'll find in the unpacked apk the apk.static file, that you can use to install apk-tools.
More info here: https://wiki.alpinelinux.org/wiki/Upgrading_Alpine
Of course, if your architecture is x86, the url is:
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86/apk-tools-static-2.6.8-r1.apk
Anyway, the package you need is "apk-tools".
Probably you mean v3.5.0.
The easier way is (if your architecture is x86_64):
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.8-r1.apk
And then unpack the downloaded file:
tar -zxvf apk-tools-static-2.6.8-r1.apk
You'll find in the unpacked apk the apk.static file, that you can use to install apk-tools.
More info here: https://wiki.alpinelinux.org/wiki/Upgrading_Alpine
Of course, if your architecture is x86, the url is:
wget http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86/apk-tools-static-2.6.8-r1.apk
Anyway, the package you need is "apk-tools".
edited Jan 23 '17 at 18:48
Philip Kirkbride
2,4212984
2,4212984
answered Jan 23 '17 at 17:59
Francesco ColistaFrancesco Colista
197110
197110
add a comment |
add a comment |
One addition to Francesco's answer (since I don't have the reputation to comment yet):
You may need to use the curl command with the -o flag instead of wget, depending on how your container is configured. (If you get a wget: command not found message, that's probably a good fallback.)
===
Edit: Also, it looks from the "packages" page like they may have removed this minor version in favor of 2.6.9:
https://pkgs.alpinelinux.org/packages?name=apk-tools-static&branch=&repo=&arch=&maintainer=
... so the command set I ended up using was more like:
curl -o apk-tools-static-2.6.8-r1.apk http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.9-r0.apk
tar -zxvf apk-tools-static-2.6.8-r1.apk
cd sbin
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted --initdb add apk-tools-static
sudo apk.static update
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools
sudo apk update
... etc.,.
Usual disclaimer: If you can run things without using sudo, you really should do that. My situation is not your situation. Try everything without sudo first.
add a comment |
One addition to Francesco's answer (since I don't have the reputation to comment yet):
You may need to use the curl command with the -o flag instead of wget, depending on how your container is configured. (If you get a wget: command not found message, that's probably a good fallback.)
===
Edit: Also, it looks from the "packages" page like they may have removed this minor version in favor of 2.6.9:
https://pkgs.alpinelinux.org/packages?name=apk-tools-static&branch=&repo=&arch=&maintainer=
... so the command set I ended up using was more like:
curl -o apk-tools-static-2.6.8-r1.apk http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.9-r0.apk
tar -zxvf apk-tools-static-2.6.8-r1.apk
cd sbin
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted --initdb add apk-tools-static
sudo apk.static update
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools
sudo apk update
... etc.,.
Usual disclaimer: If you can run things without using sudo, you really should do that. My situation is not your situation. Try everything without sudo first.
add a comment |
One addition to Francesco's answer (since I don't have the reputation to comment yet):
You may need to use the curl command with the -o flag instead of wget, depending on how your container is configured. (If you get a wget: command not found message, that's probably a good fallback.)
===
Edit: Also, it looks from the "packages" page like they may have removed this minor version in favor of 2.6.9:
https://pkgs.alpinelinux.org/packages?name=apk-tools-static&branch=&repo=&arch=&maintainer=
... so the command set I ended up using was more like:
curl -o apk-tools-static-2.6.8-r1.apk http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.9-r0.apk
tar -zxvf apk-tools-static-2.6.8-r1.apk
cd sbin
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted --initdb add apk-tools-static
sudo apk.static update
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools
sudo apk update
... etc.,.
Usual disclaimer: If you can run things without using sudo, you really should do that. My situation is not your situation. Try everything without sudo first.
One addition to Francesco's answer (since I don't have the reputation to comment yet):
You may need to use the curl command with the -o flag instead of wget, depending on how your container is configured. (If you get a wget: command not found message, that's probably a good fallback.)
===
Edit: Also, it looks from the "packages" page like they may have removed this minor version in favor of 2.6.9:
https://pkgs.alpinelinux.org/packages?name=apk-tools-static&branch=&repo=&arch=&maintainer=
... so the command set I ended up using was more like:
curl -o apk-tools-static-2.6.8-r1.apk http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/apk-tools-static-2.6.9-r0.apk
tar -zxvf apk-tools-static-2.6.8-r1.apk
cd sbin
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted --initdb add apk-tools-static
sudo apk.static update
sudo ./apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools
sudo apk update
... etc.,.
Usual disclaimer: If you can run things without using sudo, you really should do that. My situation is not your situation. Try everything without sudo first.
edited Jan 11 at 7:50
Jainam Jhaveri
1034
1034
answered Nov 9 '17 at 9:08
Patrick at workPatrick at work
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338962%2finstall-apk-tool-on-alpine-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown