Reputation: 71
here is my issue background, I need to install postgresql and mongodb on one off-line server, so I copied the deb file from one server which already installed postgresql and mongodb properly, but at last step when I try sudo apt-get install on off-line server, I always get below error:
E: Failed to fetch file:/var//var/debs/postgresql-10_10.4-2.pgdg16.04+1_amd64.deb File not found - /var//var/debs/postgresql-10_10.4-2.pgdg16.04+1_amd64.deb (2: No such file or directory)
below is my step:
tar the debs and copy to the off-line server
execute follow commands in off-line server
sudo cp -r path/debs/* /var/debs/
sudo touch /var/debs/Packages.gz
sudo chmod -R 777 /var/debs/
sudo dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz
update the /etc/apt/sources.list and do apt-get update
here is how the sources.list looks like: I removed all the other deb, only keep one line which is the path I copied the deb from the server which has postgresql and mongodb installed.
deb file:/var debs/
then I run sudo apt-get update, and run install but always be told the deb can not found, I am thinking should the sources.list I use is wrong format, hope someone can help me, thanks alot.
Upvotes: 0
Views: 212
Reputation: 71
not sure what's the issue about the sources.list, but I changed the location to /packages, and updated the sources.list like below, then apt-get install works.
deb file:// /packages/
be careful here //space/packages
Upvotes: 0