You may have had situations in which the Ubuntu PC connected to the Internet is a 32-bit one and all the packages you download and install using apt-get are 32-bit (i386) packages; but you need 64-bit (amd64) debian (.deb) packages to install them on another Ubuntu machine which is 64-bit. Here’s a workaround.
1. Make sure aptitude package manager is installed on the Internet connected Ubuntu PC. Open the terminal (Ctl+Alt+T) and run the command
$ whatis aptitude aptitude (8) - high-level interface to the package manager
If you get aptitude:nothing appropriate message, then you need to install the aptitude using apt-get.
$ sudo apt-get update $ sudo apt-get install aptitude
2. Aptitude’s -o (small oh) switch allows you to specify the key=value pair to inform the architecture. You need to update the package cache and then download the package.
$ sudo aptitude -o APT::Architecture="amd64" update $ sudo aptitude -o APT::Architecture="amd64" download package_name
Note that the Architecture is specified as “amd64” which updates the package index for 64-bit packages only. The download option will download the package to the current directory.
You can now copy the *.deb package downloaded to other offline 64-bit Ubuntu PCs and install on them.
Run apt-get update to restore the package index to the correct i386 package information.
Note: If you’re behind proxy, follow this post to set the proxy IP and credentials for apt-get to work through the proxy.
Also as this AskUbuntu answer suggests you can manually download all the packages using the URIs of the package given by the apt-get –print-uris install pkg while installing.