We have an offline network with a repo/mirror on it. but I can't figure out how to add it to my sources.list correctly

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












I have been reading tutorials on how to setup local network repos. But this is not quite what I have - in my case there is a network repo already existing - lets say it lives here:



http://netpc/repos/



Inside the folder structure looks like (I have only expanded this a little bit, but there is loads of folders / sub-folders that all look very Ubuntu-y):



/1604/
/1604/mirror
/1604/mirror/archive.ubuntu.com
/1604/mirror/archive.ubuntu.com/mwg-internal
/1604/mirror/archive.ubuntu.com/ubuntu
/1604/skel
/1604/var
...etc...


So following what I have read I think I just need to update my /etc/apt/sources.list file. I have made a backup, then I added the following to the file:



# Adding local network repo
deb http://netpc/repos ./


Then I did the following command:



sudo apt-get update


I got the following output (hand-typed cuz its on a different PC offline):



Ign:1 http://netpc/repos/1604/ ./ InRelease
Ign:2 http://netpc/repos/1604/ ./ Release
Ign:3 http://netpc/repos/1604/ ./ Packges
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Ign:3 http://netpc/repos/1604/ ./ Packages
:
:
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Err:3 http://netpc/repos/1604/ ./ Packages
404 Not Found
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
:
:
W: the repository 'http://netpc/repos/1604 ./ Release' does not have a release file.
:
:
E: Failed to fetch http://netpc/repos/1604/./Packages 404 Not Found


It tries to connect to the other repos on the web (but we are not connected to the web) so it can't find places like gb.archive.ubuntu.com...



So I want my system to ignore on-line locations and just use my one "mirror" location on our LAN.



  • Why is my setup not working (what did I miss)?

  • What steps do I need to take to solve this and to ignore other internet-based locations?

UPDATE



I have updating sources.list from the two answers - I tried the following with better results:



# Main and restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted

# Universe
:
# Multiverse
:


and re-ran sudo apt-get update



So I can't type out all of the output, but I've put the main errors at the end of the process here:



E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found 
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-i386/Packages 404 Not Found
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-i386/Packages 404 Not Found


So it looks like it can't find i386 stuff (32-bit) which I am not sure I care about because I am using 64-bit... I think...










share|improve this question























  • Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
    – Organic Marble
    Feb 21 at 15:22











  • @OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
    – code_fodder
    Feb 21 at 15:28










  • You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
    – Organic Marble
    Feb 21 at 15:33







  • 1




    @OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
    – code_fodder
    Feb 21 at 15:42














up vote
2
down vote

favorite












I have been reading tutorials on how to setup local network repos. But this is not quite what I have - in my case there is a network repo already existing - lets say it lives here:



http://netpc/repos/



Inside the folder structure looks like (I have only expanded this a little bit, but there is loads of folders / sub-folders that all look very Ubuntu-y):



/1604/
/1604/mirror
/1604/mirror/archive.ubuntu.com
/1604/mirror/archive.ubuntu.com/mwg-internal
/1604/mirror/archive.ubuntu.com/ubuntu
/1604/skel
/1604/var
...etc...


So following what I have read I think I just need to update my /etc/apt/sources.list file. I have made a backup, then I added the following to the file:



# Adding local network repo
deb http://netpc/repos ./


Then I did the following command:



sudo apt-get update


I got the following output (hand-typed cuz its on a different PC offline):



Ign:1 http://netpc/repos/1604/ ./ InRelease
Ign:2 http://netpc/repos/1604/ ./ Release
Ign:3 http://netpc/repos/1604/ ./ Packges
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Ign:3 http://netpc/repos/1604/ ./ Packages
:
:
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Err:3 http://netpc/repos/1604/ ./ Packages
404 Not Found
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
:
:
W: the repository 'http://netpc/repos/1604 ./ Release' does not have a release file.
:
:
E: Failed to fetch http://netpc/repos/1604/./Packages 404 Not Found


It tries to connect to the other repos on the web (but we are not connected to the web) so it can't find places like gb.archive.ubuntu.com...



So I want my system to ignore on-line locations and just use my one "mirror" location on our LAN.



  • Why is my setup not working (what did I miss)?

  • What steps do I need to take to solve this and to ignore other internet-based locations?

UPDATE



I have updating sources.list from the two answers - I tried the following with better results:



# Main and restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted

# Universe
:
# Multiverse
:


and re-ran sudo apt-get update



So I can't type out all of the output, but I've put the main errors at the end of the process here:



E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found 
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-i386/Packages 404 Not Found
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-i386/Packages 404 Not Found


So it looks like it can't find i386 stuff (32-bit) which I am not sure I care about because I am using 64-bit... I think...










share|improve this question























  • Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
    – Organic Marble
    Feb 21 at 15:22











  • @OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
    – code_fodder
    Feb 21 at 15:28










  • You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
    – Organic Marble
    Feb 21 at 15:33







  • 1




    @OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
    – code_fodder
    Feb 21 at 15:42












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have been reading tutorials on how to setup local network repos. But this is not quite what I have - in my case there is a network repo already existing - lets say it lives here:



http://netpc/repos/



Inside the folder structure looks like (I have only expanded this a little bit, but there is loads of folders / sub-folders that all look very Ubuntu-y):



/1604/
/1604/mirror
/1604/mirror/archive.ubuntu.com
/1604/mirror/archive.ubuntu.com/mwg-internal
/1604/mirror/archive.ubuntu.com/ubuntu
/1604/skel
/1604/var
...etc...


So following what I have read I think I just need to update my /etc/apt/sources.list file. I have made a backup, then I added the following to the file:



# Adding local network repo
deb http://netpc/repos ./


Then I did the following command:



sudo apt-get update


I got the following output (hand-typed cuz its on a different PC offline):



Ign:1 http://netpc/repos/1604/ ./ InRelease
Ign:2 http://netpc/repos/1604/ ./ Release
Ign:3 http://netpc/repos/1604/ ./ Packges
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Ign:3 http://netpc/repos/1604/ ./ Packages
:
:
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Err:3 http://netpc/repos/1604/ ./ Packages
404 Not Found
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
:
:
W: the repository 'http://netpc/repos/1604 ./ Release' does not have a release file.
:
:
E: Failed to fetch http://netpc/repos/1604/./Packages 404 Not Found


It tries to connect to the other repos on the web (but we are not connected to the web) so it can't find places like gb.archive.ubuntu.com...



So I want my system to ignore on-line locations and just use my one "mirror" location on our LAN.



  • Why is my setup not working (what did I miss)?

  • What steps do I need to take to solve this and to ignore other internet-based locations?

UPDATE



I have updating sources.list from the two answers - I tried the following with better results:



# Main and restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted

# Universe
:
# Multiverse
:


and re-ran sudo apt-get update



So I can't type out all of the output, but I've put the main errors at the end of the process here:



E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found 
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-i386/Packages 404 Not Found
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-i386/Packages 404 Not Found


So it looks like it can't find i386 stuff (32-bit) which I am not sure I care about because I am using 64-bit... I think...










share|improve this question















I have been reading tutorials on how to setup local network repos. But this is not quite what I have - in my case there is a network repo already existing - lets say it lives here:



http://netpc/repos/



Inside the folder structure looks like (I have only expanded this a little bit, but there is loads of folders / sub-folders that all look very Ubuntu-y):



/1604/
/1604/mirror
/1604/mirror/archive.ubuntu.com
/1604/mirror/archive.ubuntu.com/mwg-internal
/1604/mirror/archive.ubuntu.com/ubuntu
/1604/skel
/1604/var
...etc...


So following what I have read I think I just need to update my /etc/apt/sources.list file. I have made a backup, then I added the following to the file:



# Adding local network repo
deb http://netpc/repos ./


Then I did the following command:



sudo apt-get update


I got the following output (hand-typed cuz its on a different PC offline):



Ign:1 http://netpc/repos/1604/ ./ InRelease
Ign:2 http://netpc/repos/1604/ ./ Release
Ign:3 http://netpc/repos/1604/ ./ Packges
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Ign:3 http://netpc/repos/1604/ ./ Packages
:
:
Ign:5 http://netpc/repos/1604/ ./ Translation-en
Err:3 http://netpc/repos/1604/ ./ Packages
404 Not Found
Ign:4 http://netpc/repos/1604/ ./ Translation-en_GB
Ign:5 http://netpc/repos/1604/ ./ Translation-en
:
:
W: the repository 'http://netpc/repos/1604 ./ Release' does not have a release file.
:
:
E: Failed to fetch http://netpc/repos/1604/./Packages 404 Not Found


It tries to connect to the other repos on the web (but we are not connected to the web) so it can't find places like gb.archive.ubuntu.com...



So I want my system to ignore on-line locations and just use my one "mirror" location on our LAN.



  • Why is my setup not working (what did I miss)?

  • What steps do I need to take to solve this and to ignore other internet-based locations?

UPDATE



I have updating sources.list from the two answers - I tried the following with better results:



# Main and restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-updates main restricted
deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial-security main restricted

# Universe
:
# Multiverse
:


and re-ran sudo apt-get update



So I can't type out all of the output, but I've put the main errors at the end of the process here:



E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found 
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-i386/Packages 404 Not Found
E: Failed to fetch http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-i386/Packages 404 Not Found


So it looks like it can't find i386 stuff (32-bit) which I am not sure I care about because I am using 64-bit... I think...







16.04 apt repository






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 15:27

























asked Feb 21 at 14:45









code_fodder

1358




1358











  • Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
    – Organic Marble
    Feb 21 at 15:22











  • @OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
    – code_fodder
    Feb 21 at 15:28










  • You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
    – Organic Marble
    Feb 21 at 15:33







  • 1




    @OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
    – code_fodder
    Feb 21 at 15:42
















  • Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
    – Organic Marble
    Feb 21 at 15:22











  • @OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
    – code_fodder
    Feb 21 at 15:28










  • You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
    – Organic Marble
    Feb 21 at 15:33







  • 1




    @OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
    – code_fodder
    Feb 21 at 15:42















Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
– Organic Marble
Feb 21 at 15:22





Please edit your question and add in specifics on the error you got. Otherwise we're just guessing. It would also help if you added your complete sources.list
– Organic Marble
Feb 21 at 15:22













@OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
– code_fodder
Feb 21 at 15:28




@OrganicMarble sorry - have to hand-type it : ( ... added the main errors. It is making some progress now (I can see the percentage going up and a load of gets).
– code_fodder
Feb 21 at 15:28












You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
– Organic Marble
Feb 21 at 15:33





You are probably right about the 32 bit archives. I had to go back in and add them to my local mirror. If you don't need them, you can add [arch=amd64] after the word deb in your sources.list and you won't get this error. The lines would look like deb [arch=amd64] http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu xenial main restricted
– Organic Marble
Feb 21 at 15:33





1




1




@OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
– code_fodder
Feb 21 at 15:42




@OrganicMarble yeah - that got it : ) ... I have further issues with versions/broken-packages (my test is to install vim i.e. sudo apt-get install vim) but I think that is for another questions. Thanks : )
– code_fodder
Feb 21 at 15:42










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










I'm not an expert, but I have set up my own local mirror and got it to work.



I'm suspicious of the ./ in the line you added to sources.list. Mine looks like this:



# updated for local mirror on 2/11/18

# local main & restricted sources

deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security main restricted

# local universe sources

deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic universe
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security universe

# local multiverse sources

deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security multiverse


I use ssh instead of http, but that is not the difference I am trying to point out.



I think you need to edit your sources.list and add the proper text after the URL.






share|improve this answer



























    up vote
    1
    down vote













    Simply adding the base URL of your LAN repository is not enough. You need to direct apt to the relevant parts of the repository structure, including which version of Ubuntu you're using (by release name).



    Replace the base URL in each line of your sources file, but keep the rest of the information on that line.



    If you're using 14.04, Trusty Tahr, your /etc/apt/sources.list file looks something like this:



    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted
    deb-src http://gb.archive.ubuntu.com/ubuntu trusty main restricted
    ...


    Your updated file should look more like:



    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
    deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
    ...





    share|improve this answer




















      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',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1008412%2fwe-have-an-offline-network-with-a-repo-mirror-on-it-but-i-cant-figure-out-how%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote



      accepted










      I'm not an expert, but I have set up my own local mirror and got it to work.



      I'm suspicious of the ./ in the line you added to sources.list. Mine looks like this:



      # updated for local mirror on 2/11/18

      # local main & restricted sources

      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security main restricted

      # local universe sources

      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic universe
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates universe
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security universe

      # local multiverse sources

      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic multiverse
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
      deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security multiverse


      I use ssh instead of http, but that is not the difference I am trying to point out.



      I think you need to edit your sources.list and add the proper text after the URL.






      share|improve this answer
























        up vote
        2
        down vote



        accepted










        I'm not an expert, but I have set up my own local mirror and got it to work.



        I'm suspicious of the ./ in the line you added to sources.list. Mine looks like this:



        # updated for local mirror on 2/11/18

        # local main & restricted sources

        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security main restricted

        # local universe sources

        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic universe
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates universe
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security universe

        # local multiverse sources

        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic multiverse
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
        deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security multiverse


        I use ssh instead of http, but that is not the difference I am trying to point out.



        I think you need to edit your sources.list and add the proper text after the URL.






        share|improve this answer






















          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          I'm not an expert, but I have set up my own local mirror and got it to work.



          I'm suspicious of the ./ in the line you added to sources.list. Mine looks like this:



          # updated for local mirror on 2/11/18

          # local main & restricted sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security main restricted

          # local universe sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic universe
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates universe
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security universe

          # local multiverse sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic multiverse
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security multiverse


          I use ssh instead of http, but that is not the difference I am trying to point out.



          I think you need to edit your sources.list and add the proper text after the URL.






          share|improve this answer












          I'm not an expert, but I have set up my own local mirror and got it to work.



          I'm suspicious of the ./ in the line you added to sources.list. Mine looks like this:



          # updated for local mirror on 2/11/18

          # local main & restricted sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic main restricted
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security main restricted

          # local universe sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic universe
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates universe
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security universe

          # local multiverse sources

          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic multiverse
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
          deb ssh://my-server/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu/ bionic-security multiverse


          I use ssh instead of http, but that is not the difference I am trying to point out.



          I think you need to edit your sources.list and add the proper text after the URL.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 21 at 14:58









          Organic Marble

          9,99463255




          9,99463255






















              up vote
              1
              down vote













              Simply adding the base URL of your LAN repository is not enough. You need to direct apt to the relevant parts of the repository structure, including which version of Ubuntu you're using (by release name).



              Replace the base URL in each line of your sources file, but keep the rest of the information on that line.



              If you're using 14.04, Trusty Tahr, your /etc/apt/sources.list file looks something like this:



              # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
              # newer versions of the distribution.
              deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted
              deb-src http://gb.archive.ubuntu.com/ubuntu trusty main restricted
              ...


              Your updated file should look more like:



              # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
              # newer versions of the distribution.
              deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
              deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
              ...





              share|improve this answer
























                up vote
                1
                down vote













                Simply adding the base URL of your LAN repository is not enough. You need to direct apt to the relevant parts of the repository structure, including which version of Ubuntu you're using (by release name).



                Replace the base URL in each line of your sources file, but keep the rest of the information on that line.



                If you're using 14.04, Trusty Tahr, your /etc/apt/sources.list file looks something like this:



                # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                # newer versions of the distribution.
                deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                deb-src http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                ...


                Your updated file should look more like:



                # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                # newer versions of the distribution.
                deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                ...





                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Simply adding the base URL of your LAN repository is not enough. You need to direct apt to the relevant parts of the repository structure, including which version of Ubuntu you're using (by release name).



                  Replace the base URL in each line of your sources file, but keep the rest of the information on that line.



                  If you're using 14.04, Trusty Tahr, your /etc/apt/sources.list file looks something like this:



                  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                  # newer versions of the distribution.
                  deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                  deb-src http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                  ...


                  Your updated file should look more like:



                  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                  # newer versions of the distribution.
                  deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                  deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                  ...





                  share|improve this answer












                  Simply adding the base URL of your LAN repository is not enough. You need to direct apt to the relevant parts of the repository structure, including which version of Ubuntu you're using (by release name).



                  Replace the base URL in each line of your sources file, but keep the rest of the information on that line.



                  If you're using 14.04, Trusty Tahr, your /etc/apt/sources.list file looks something like this:



                  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                  # newer versions of the distribution.
                  deb http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                  deb-src http://gb.archive.ubuntu.com/ubuntu trusty main restricted
                  ...


                  Your updated file should look more like:



                  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
                  # newer versions of the distribution.
                  deb http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                  deb-src http://netpc/repos/1604/mirror/archive.ubuntu.com/ubuntu trusty main restricted
                  ...






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 21 at 15:03









                  Arronical

                  12.7k84589




                  12.7k84589



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1008412%2fwe-have-an-offline-network-with-a-repo-mirror-on-it-but-i-cant-figure-out-how%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491