I need to make a list of deb files, which allows me to install things without Internet.
As we know, when we execute apt-get install XXX, we can find some deb files at /var/cache/apt/archives/. With these deb files, we can execute apt install ./*.deb to do the installation locally (without Internet).
So here is what I've done:
sudo apt-get install pkg1
sudo apt-get install pkg2
...
...
sudo cp /var/cache/apt/archives/*.deb ~/deb/
Now, I get all necessary deb files in ~/deb.
Then, I copy ~/deb to another new Ubuntu 16.04.3 and execute apt install ./deb/*.deb.
To my surprise, I found some weird errors:
1) Some debs conflict. For example, when I execute apt install ./deb/*.deb, it says that a.deb and b.deb conflict, I have to remove one of them to finish the installation.
2) After executing apt install ./deb/*.deb, the ssh of system is broken, I have to execute apt update && apt install openssh-server openssh-client to repair it.
I can't understand why the deb files coming from official source can't be installed locally properly.