How to use the mirror option of apt-cacher-ng for debootstrap?
I run debootstrap
like this:
sudo debootstrap --verbose --arch=amd64 zesty chroot
I have already installed apt-cacher-ng
.
How do I make them work together so that when I run debootstrap multiple times I use the cache instead of repeatedly downloading the same packages?
I have tried using the MIRROR option and setting the http_proxy variable but it errors when I run offline:
$ sudo http_proxy="http://localhost:3142" debootstrap --verbose --arch=amd64 zesty chroot http://localhost:3142/uburep
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://localhost:3142/uburep/dists/zesty/Release
I used http://localhost:3142/uburep
because that is what I found in the cache:
$ find /var/cache/apt-cacher-ng -name Release
/var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/zesty-security/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-updates/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-backports/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty/Release
I tried adding Defaults env_keep += "http_proxy https_proxy ftp_proxy"
to /etc/sudoers (via sudo visudo) but it didn't help either.
If I remove the MIRROR option and run debootstrap offline it then doesn't seem to use apt-cacher-ng at all (note how it is not looking for localhost any more).
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/zesty/Release
scripts debootstrap
add a comment |
I run debootstrap
like this:
sudo debootstrap --verbose --arch=amd64 zesty chroot
I have already installed apt-cacher-ng
.
How do I make them work together so that when I run debootstrap multiple times I use the cache instead of repeatedly downloading the same packages?
I have tried using the MIRROR option and setting the http_proxy variable but it errors when I run offline:
$ sudo http_proxy="http://localhost:3142" debootstrap --verbose --arch=amd64 zesty chroot http://localhost:3142/uburep
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://localhost:3142/uburep/dists/zesty/Release
I used http://localhost:3142/uburep
because that is what I found in the cache:
$ find /var/cache/apt-cacher-ng -name Release
/var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/zesty-security/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-updates/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-backports/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty/Release
I tried adding Defaults env_keep += "http_proxy https_proxy ftp_proxy"
to /etc/sudoers (via sudo visudo) but it didn't help either.
If I remove the MIRROR option and run debootstrap offline it then doesn't seem to use apt-cacher-ng at all (note how it is not looking for localhost any more).
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/zesty/Release
scripts debootstrap
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47
add a comment |
I run debootstrap
like this:
sudo debootstrap --verbose --arch=amd64 zesty chroot
I have already installed apt-cacher-ng
.
How do I make them work together so that when I run debootstrap multiple times I use the cache instead of repeatedly downloading the same packages?
I have tried using the MIRROR option and setting the http_proxy variable but it errors when I run offline:
$ sudo http_proxy="http://localhost:3142" debootstrap --verbose --arch=amd64 zesty chroot http://localhost:3142/uburep
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://localhost:3142/uburep/dists/zesty/Release
I used http://localhost:3142/uburep
because that is what I found in the cache:
$ find /var/cache/apt-cacher-ng -name Release
/var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/zesty-security/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-updates/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-backports/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty/Release
I tried adding Defaults env_keep += "http_proxy https_proxy ftp_proxy"
to /etc/sudoers (via sudo visudo) but it didn't help either.
If I remove the MIRROR option and run debootstrap offline it then doesn't seem to use apt-cacher-ng at all (note how it is not looking for localhost any more).
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/zesty/Release
scripts debootstrap
I run debootstrap
like this:
sudo debootstrap --verbose --arch=amd64 zesty chroot
I have already installed apt-cacher-ng
.
How do I make them work together so that when I run debootstrap multiple times I use the cache instead of repeatedly downloading the same packages?
I have tried using the MIRROR option and setting the http_proxy variable but it errors when I run offline:
$ sudo http_proxy="http://localhost:3142" debootstrap --verbose --arch=amd64 zesty chroot http://localhost:3142/uburep
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://localhost:3142/uburep/dists/zesty/Release
I used http://localhost:3142/uburep
because that is what I found in the cache:
$ find /var/cache/apt-cacher-ng -name Release
/var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/zesty-security/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-updates/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty-backports/Release
/var/cache/apt-cacher-ng/uburep/dists/zesty/Release
I tried adding Defaults env_keep += "http_proxy https_proxy ftp_proxy"
to /etc/sudoers (via sudo visudo) but it didn't help either.
If I remove the MIRROR option and run debootstrap offline it then doesn't seem to use apt-cacher-ng at all (note how it is not looking for localhost any more).
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/zesty/Release
scripts debootstrap
scripts debootstrap
edited Mar 14 at 10:38
xpt
1247
1247
asked Sep 23 '17 at 21:40
opticyclicopticyclic
337314
337314
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47
add a comment |
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47
add a comment |
1 Answer
1
active
oldest
votes
There is a trick to get this to work without explicit proxy settings. You can in fact use your configured apt-cacher-ng
as a mirror URL like so:
http://localhost:3142/us.archive.ubuntu.com/ubuntu/
So as you can see after specifying the base URL to your apt-cacher-ng
instance you can then give a server and a path as per this Wiki article. I've used this method in my own bootstrap scripts and it works like a charm.
Note: you may want to verify that your apt-cacher-ng
instance is running by checking with lsof -i :3142
(requires the lsof
package).
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f958795%2fhow-to-use-the-mirror-option-of-apt-cacher-ng-for-debootstrap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is a trick to get this to work without explicit proxy settings. You can in fact use your configured apt-cacher-ng
as a mirror URL like so:
http://localhost:3142/us.archive.ubuntu.com/ubuntu/
So as you can see after specifying the base URL to your apt-cacher-ng
instance you can then give a server and a path as per this Wiki article. I've used this method in my own bootstrap scripts and it works like a charm.
Note: you may want to verify that your apt-cacher-ng
instance is running by checking with lsof -i :3142
(requires the lsof
package).
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
add a comment |
There is a trick to get this to work without explicit proxy settings. You can in fact use your configured apt-cacher-ng
as a mirror URL like so:
http://localhost:3142/us.archive.ubuntu.com/ubuntu/
So as you can see after specifying the base URL to your apt-cacher-ng
instance you can then give a server and a path as per this Wiki article. I've used this method in my own bootstrap scripts and it works like a charm.
Note: you may want to verify that your apt-cacher-ng
instance is running by checking with lsof -i :3142
(requires the lsof
package).
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
add a comment |
There is a trick to get this to work without explicit proxy settings. You can in fact use your configured apt-cacher-ng
as a mirror URL like so:
http://localhost:3142/us.archive.ubuntu.com/ubuntu/
So as you can see after specifying the base URL to your apt-cacher-ng
instance you can then give a server and a path as per this Wiki article. I've used this method in my own bootstrap scripts and it works like a charm.
Note: you may want to verify that your apt-cacher-ng
instance is running by checking with lsof -i :3142
(requires the lsof
package).
There is a trick to get this to work without explicit proxy settings. You can in fact use your configured apt-cacher-ng
as a mirror URL like so:
http://localhost:3142/us.archive.ubuntu.com/ubuntu/
So as you can see after specifying the base URL to your apt-cacher-ng
instance you can then give a server and a path as per this Wiki article. I've used this method in my own bootstrap scripts and it works like a charm.
Note: you may want to verify that your apt-cacher-ng
instance is running by checking with lsof -i :3142
(requires the lsof
package).
answered Nov 20 '17 at 23:14
0xC0000022L0xC0000022L
3,02353770
3,02353770
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
add a comment |
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
I mention in the question that I am using the mirror option and it doesn't work when I am offline. What are you doing differently here?
– opticyclic
Dec 1 '17 at 21:45
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
0xC… is using the same option as you.
– Ken Sharp
Jun 22 '18 at 10:58
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f958795%2fhow-to-use-the-mirror-option-of-apt-cacher-ng-for-debootstrap%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
What Ubuntu version is this?
– George Udosen
Sep 23 '17 at 22:15
zesty. I am creating a zesty iso distribution from within zesty.
– opticyclic
Sep 23 '17 at 22:30
You shouldn't use the apt-cacher-ng URL as a mirror. It should be used a proxy only.
– muru
Oct 12 '17 at 5:17
I updated the question to demonstrate that removing the MIRROR option doesn't help.
– opticyclic
Oct 12 '17 at 6:29
Does apt-cacher's logs indicate any attempt to access it when used only as a proxy?
– muru
Oct 12 '17 at 6:47