debian - How to make apt-offline on windows
2014-07
Apt-offline claims to be a utility that allows you to install packages on Debian without internet connection. It can be downloaded from the git repository.
As with many free software, the problem is that it's undocumented and that you have build it yourself. In the git repository I've linked to, there's a information file INSTALL
:
# Execute the file using the python interpreter
# Assuming python.exe is in your path
# To build
C:\> python setup.py build
# To install
C:\> python setup.py install
I've ran build and then install. I could've seen some parse errors spit out by Python. I hope these don't matter. Anyway, I just ended up with a few more folders and few more files without extension (why do some people omit extensions all the time?).
So my question here is just how to build and install the utility properly - given it's possible. (and this question suggests it might be possible)
I've just installed it on a Windows XP machine as follows:-
Install Python 2.7. Make sure you choose the correct architecture (32/64 bit). Select the option to add python.exe
to your path as it will make things easier later.
Install PyQt4. Again, make sure you choose the correct architecture for your Windows.
Download apt-offline. Extract it to the C:\ drive. The folder will be called apt-offline-master
- rename it to apt-offline
to save on your typing later.
Open the Windows terminal. Type the following:-
cd c:\apt-offline
python setup.py build
python setup.py install
python apt-offline-gui
I recently installed Debian Lenny 5.0.3 on a macbook (black, model 4,1). The system seems to work.
However, I found out that my ethernet port is not working (I have only used wireless so far), and getting my computer repaired for 6 months is currently not an option.... so I need to get my WiFi up and running!
I found a guide on how to do that here, but this assumes that I have acces to either synaptic (no internet) or make/automake, but (root)terminal says:
batman@debian:~$ make foo
bash: make: command not found
batman@debian:~$ automake bar
bash: automake: command not found
batman@debian:~$
So, long story short, I need to:
- get make or automake using the internet on another computer, and then transfer with a usb stick or
- get packages with apt-get / synaptic the same way.
My wireless card is a Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03), by the way.
Any ideas will be much appreciated!
Doing this via Sneakernet (eg, thumbdrive) is possible, but it won't be pretty. Basically, you get to do Apt's job and search through http://packages.debian.org by hand for the packages you need (and all their dependencies).
Start with searching by package name on the front page.
make
is an easy one (there's only one). Unfortunately, there are lots ofautomake
packages (automake, automake1.4, automake1.7, automake1.9 ...), and the package you're compiling may require a specific version.Go to the main page for each package, and find your architecture in the table at the bottom (i386, ia64, amd64, etc). That links to a download page for the package.
Repeat step 2 for any dependencies listed on the package page (the red dots) you don't already have, and any suggested packages you might need.
Repeat step 3 for each dependency you downloaded.
You can do this with apt-get/synaptic on another Debian Lenny system (that is internet-capable) if you have one available. Just use apt-get or Synaptic to install the packages you need on that system. The downloaded packages are placed in
/var/cache/apt/archives
after installation. Just:Copy files from
/var/cache/apt/archives
onto your thumbdrive, andUse
dpkg -i package.deb
to install the package files to the offline system.
You can install make (and other needed tools) from DVD.
(was a recommendation for apt-zip, but upon further reflection, there's another package that's better:)
apt-cross might be appropriate for you, if you have another Debian system: you tell it the architecture and suite (lenny), and it can download the appropriate packages for you.