The Issue.
You are trying to install the Adobe Flash Player Plugin software package (i.e., “flashplugin-installer”) on a computer that has only limited internet access. Because of the limited connectivity, you install from a local software repository mirror.
Since you are installing from a local mirror, you are hoping that the software will not need to be downloaded from the internet, but that it will be taken from your local mirror instead.
Your assumption initially appears to be confirmed when you run the following command to perform the installation:
Code:
sudo apt-get install flashplugin-installer
Indeed, the first few lines of output from this command look like this:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
xulrunner-1.9 konqueror-nsplugins ttf-xfree86-nonfree xfs
The following packages will be upgraded:
flashplugin-installer
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 0B/19.9kB of archives.
After this operation, 0B of additional disk space will be used.
You notice, specifically, the line that reads “Need to get 0B/19.9kB of archives.”
From this output line, you draw the conclusion that, as expected, the software packages will not be downloaded from the internet, but that the files that you want to install, will be taken from your local repository instead.
However, as the operation continues, you discover that the installer still attempts to download a “.tar.gz” archive file; this download will, obviously, fail if the computer does not have an active internet connection—e.g.:
Code:
Setting up flashplugin-installer (10.1.85.3ubuntu0.10.04.1) ...
Downloading...
--2010-09-21 22:04:11-- http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_10.1.85.3.orig.tar.gz
Resolving archive.canonical.com... failed: Name or service not known.
wget: unable to resolve host address `archive.canonical.com'
download failed
The Flash plugin is NOT installed.
This document will explain how you can examine the “flashplugin-installer” package, and find a way to avoid having the package download the archive file during installation.
Note:
This document assumes, as an example, that the local
Ubuntu software mirror is located in the following directory:
Code:
/LinuxDistros/Ubuntu-10.04/Repositories/Ubuntu
Likewise, the document refers to a local
Canonical software mirror in the following directory:
Code:
/LinuxDistros/Ubuntu-10.04/Repositories/Canonical
If your local mirrors are located elsewhere, then, obviously, you will have to modify the paths to your mirrors accordingly.
Note:
This document is based on my earlier, similar, post on
Installing the Flash Player Plugin from a customised local software repository, but it was updated to a more recent version of the Flash Player Plugin.
1. Getting a Copy of the “flashplugin-installer” Package.
Since you are installing from your local software repository mirror, the “flashplugin-installer” package should be available in your mirror. To find out where exactly it is located, you can run the following command:
Code:
apt-cache showpkg flashplugin-installer
The first few lines of output from this command look like this:
Code:
Package: flashplugin-installer
Versions:
10.1.85.3ubuntu0.10.04.1 (/var/lib/apt/lists/_LinuxDistros_Ubuntu-10.04_Repositories_Ubuntu_dists_lucid-security_multiverse_binary-amd64_Packages) (/var/lib/apt/lists/_LinuxDistros_Ubuntu-10.04_Repositories_Ubuntu_dists_lucid-updates_multiverse_binary-amd64_Packages) (/var/lib/dpkg/status)
This output identifies the directory that contains the package list (i.e., the “Packages” file) in which the “flashplugin-installer” package is described:
Code:
/LinuxDistros/Ubuntu-10.04/Repositories/Ubuntu/dists/lucid-security/multiverse/binary-amd64
If you list the contents of this directory, then you will see that, apparently, only the compressed copies of the package list, “Packages.bz2” and “Packages.gz,” are available. You can open either copy with the “Archive Manager,” and you will find that they contain a “Packages” file—which you can open in the text editor.
Note:
As an alternative, you can use the
“less” page viewer to view either copy in a command-line shell window. Just move to the directory that contains the two copies, and then run the following command:
The “flashplugin-installer” package is documented in this file under the following heading:
Code:
Package: flashplugin-installer
One of the items in this section is the “Filename:” line, which looks like this:
Code:
Filename: pool/multiverse/f/flashplugin-nonfree/flashplugin-installer_10.1.85.3ubuntu0.10.04.1_amd64.deb
Thus, the package file name is “flashplugin-installer_10.1.85.3ubuntu0.10.04.1_amd64.deb,” and the file is located in the following directory:
Code:
/LinuxDistros/Ubuntu-10.04/Repositories/Ubuntu/pool/multiverse/f/binary-amd64/flashplugin-nonfree
Copy the file, “flashplugin-installer_10.1.85.3ubuntu0.10.04.1_amd64.deb,” from this directory to an easily accessible location—e.g., to your home directory.
2. Extracting the Control Information from the Package.
To take a look at what a software package actually does when you install it, you will have to extract its control information—which includes configuration settings and script files to guide the installation process (as well as the uninstallation process).
To extract the control information from a Debian package file, you can use the “dpkg-deb” command, and pass it the “--control” option. The following command, for instance, will extract the control information from your copy of the “flashplugin-installer” package file:
Code:
dpkg-deb --control flashplugin-installer_10.1.85.3ubuntu0.10.04.1_amd64.deb
This command will not produce any visible output, but it will create a “DEBIAN” directory, in which it copies the control information from the package file. You can run the following command to obtain a list of the extracted control files:
The output will look something like this:
Code:
total 36
-rwxr-xr-x 1 luvr luvr 1457 2010-09-21 01:40 config
-rw-r--r-- 1 luvr luvr 1942 2010-09-21 01:40 control
-rw-r--r-- 1 luvr luvr 334 2010-09-21 01:40 md5sums
-rwxr-xr-x 1 luvr luvr 5126 2010-09-21 01:40 postinst
-rwxr-xr-x 1 luvr luvr 206 2010-09-21 01:40 postrm
-rwxr-xr-x 1 luvr luvr 2505 2010-09-21 01:40 prerm
-rw-r--r-- 1 luvr luvr 5438 2010-09-21 01:40 templates
Two of these files are of particular interest:
- config
This is the script that will drive the configuration of the installation process.
In the case of the “flashplugin-installer” package, for example, this script will decide if the supporting files will have to be downloaded, or have been made available locally. - postinst
This is the script that will take any post-installation steps required to make the installed software fully functional.
These two script files can help you determine which files you will have to make available locally, and where you have to copy them, in order to keep the installer from attempting to download any further files during the installation process.
3. Examining the “config” File.
If you open the “config” file in any text editor, then you will see the following code fragments near the top of the file:
Code:
FLASH_VERSION=10.1.85.3
FILENAME=adobe-flashplugin_${FLASH_VERSION}.orig.tar.gz
SHA256SUM_TGZ="cd58b8550aa6c2e99d2b392f854a985e2d73a38d47a0f6d7709b69e9b4dae3e3"
Code:
db_get flashplugin-installer/local
echo "$SHA256SUM_TGZ $RET/$FILENAME" \
| sha256sum -c > /dev/null 2>&1 \
|| db_set flashplugin-installer/local /var/cache/flashplugin-installer
This code apparently looks for a file named “adobe-flashplugin_10.1.85.3.orig.tar.gz” in a directory named “/var/cache/flashplugin-installer”; if it finds the file there, then it will run the “sha256sum” utility to verify the integrity of the file.
Presumably, if the file is found, and if its checksum matches, then the Flash player plugin will be installed from this local copy; otherwise, the script will force a download from the internet during the installation process—though it is not yet clear from which online location.
4. Examining the “postinst” File.
Next, if you open the “postinst” file in any text editor, then you will find the following code near the top of the file:
Code:
FLASH_VERSION=10.1.85.3
FILENAME=adobe-flashplugin_${FLASH_VERSION}.orig.tar.gz
SHA256SUM_TGZ="cd58b8550aa6c2e99d2b392f854a985e2d73a38d47a0f6d7709b69e9b4dae3e3"
PARTNER_URL=http://archive.canonical.com/pool/partner/a/adobe-flashplugin/$FILENAME
This code appears to set up the URL from which the file, “adobe-flashplugin_10.1.85.3.orig.tar.gz,” will be downloaded (if no valid local copy of the file is available).
The file will be downloaded from the following online directory resource:
Code:
http://archive.canonical.com/pool/partner/a/adobe-flashplugin/
Incidentally, this is a location within the online Canonical software repository; if you created a local mirror of this repository, then your system will have downloaded this resource into a local directory—e.g.:
Code:
/LinuxDistros/Ubuntu-10.04/Repositories/Canonical/pool/partner/a/adobe-flashplugin
For easy access, you may want to temporarily copy the “adobe-flashplugin_10.1.85.3.orig.tar.gz” file from this location to, e.g., your home directory. If you want to do this from the command-line shell, then just move to the directory that contains the file, and run the following command:
Code:
cp adobe-flashplugin_10.1.85.3.orig.tar.gz ~
Note:
Alternatively, if you have not set up a local mirror of the
Canonical software repository, you will temporarily need internet access to download the file, e.g., with the following command:
Code:
wget http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_10.1.85.3.orig.tar.gz
5. OPTIONAL: Verifying the Checksum.
If you wish, you can now verify the checksum of the “adobe-flashplugin_10.1.85.3.orig.tar.gz” file, with the following command:
Code:
sha256sum -b adobe-flashplugin_10.1.85.3.orig.tar.gz
The output from this command should look like this:
Code:
cd58b8550aa6c2e99d2b392f854a985e2d73a38d47a0f6d7709b69e9b4dae3e3 *adobe-flashplugin_10.1.85.3.orig.tar.gz
In particular, the checksum value (i.e., the 64-character string with which the line begins) should match the SHA256SUM_TGZ value that you encountered in both the “config” and “postinst” scripts.
Alternatively, you can first create a checksum verification file—i.e., a file with the following contents, all on one line:
- The expected checksum of the file that you want to verify—i.e., the SHA256SUM_TGZ value, which you can copy from the “config” and “postinst” scripts:
Code:
cd58b8550aa6c2e99d2b392f854a985e2d73a38d47a0f6d7709b69e9b4dae3e3
- A blank space, followed by an asterisk:
- The name of the file that you want to verify:
Code:
adobe-flashplugin_10.1.85.3.orig.tar.gz
(Note that the resulting line is identical to the output from the “sha256sum” command, above.)
Save this file as, e.g., “SHA256,” and run the following command:
Code:
sha256sum -c SHA256
This time, the output should look like this:
Code:
adobe-flashplugin_10.1.85.3.orig.tar.gz: OK
6. Installing the Flash Player Plugin, without Internet Access.
You are now ready to install the Flash Player Plugin from your local software repository mirror, without requiring internet access during the process. Before you do so, you will have to create the “/var/cache/flashplugin-installer” directory, and copy the “adobe-flashplugin_10.1.85.3.orig.tar.gz” file into it. Just run the following commands:
Code:
sudo mkdir /var/cache/flashplugin-installer
sudo cp adobe-flashplugin_10.1.85.3.orig.tar.gz /var/cache/flashplugin-installer
You can subsequently install the plugin with, e.g., the following command:
Code:
sudo apt-get install flashplugin-installer
The following output line will, then, confirm that the plugin will be installed from the locally available copy of the “adobe-flashplugin_10.1.85.3.orig.tar.gz” file:
Code:
Installing from local file /var/cache/flashplugin-installer/adobe-flashplugin_10.1.85.3.orig.tar.gz
Bookmarks