Installing apt

I've been trying to get the Debian package manager apt installed on the minibook. Rather than writing a number of topics on this, I am going to update this post. The program dpkg comes with 3MX but unfortunately the version supplied does not work and needs to be updated.

Here is a howto:

* Download the following deb files:
apt - link here
dpkg - link here
sys-rc - link here
debianutils - link here
* Only the apt,dpkg, and debianutils debs need to be converted to patch files. To do this following the steps in the topic at linuxlaptop forum - link here
* Only one file is required from sysv.rc. To extract it, do the following -
Type in terminal:
    ar xv sysv-rc_2.86.ds1-38+etchnhalf.1_all
enter mc (then enter)
Go into data.tar.gz tar
go into user folder
go into sbin folder
Press F5
copy update-rc.d file to where patch files are located
* Copy the three patch files, update.rc.d & dpkg_1.13.26_mipsel.deb onto memory stick
* Boot up minibook and insert memory stick into USB port
* Open terminal
* copy files from USB folder to root folder
* Type in Terminal the following commands -
   xap-install dpkg_1.13.26.patch
   xap-install apt_0.6.46.4-0.1.patch
   xap-install debianutils_2.17.patch
   mkdir /etc/rc1.d
   mkdir /etc/rc4.d
   mkdir /etc/rcS.d
   mkdir /etc/rc6.d
   mkdir /var/backups
   mkdir /usr/share/base-files
   mkdir /var/lib/dpkg
   touch /var/lib/dpkg/status
   touch /var/lib/dpkg/available
   touch /usr/share/base-files/info.dir
   touch /var/backups/infodir.bak
   cp update-rc.d /etc/rcS.d
   cp update-rc.d /usr/sbin
   echo deb http://ftp.debian.org/debian/ etch main contrib non-free > /etc/apt/sources.list.d/sources.list


The dpkg database needs to be setup. To do this:

at Terminal, enter :
   mc
(midnight commander is loaded)
goto folder /var/lib/dpkg
move cursor to available
Press F4
Enter the following in file and ensure there is two blank lines at end of file:

Package: dpkg
Essential: yes
Priority: required
Section: admin
Installed-Size: 7004
Origin: debian
Maintainer: Ubuntu Core Developers
Bugs: debbugs://bugs.debian.org
Architecture: i386
Version: 1.14.16.6ubuntu4
Replaces: dpkg-doc-ja, dpkg-static, manpages-de (<= 0.4-3), manpages-pl (<= 20051117-1)
Pre-Depends: coreutils (>= 5.93-1), libc6 (>= 2.4), lzma
Suggests: apt
Breaks: apt (<< 0.7.6ubuntu6), aptitude (<< 0.4.6.1-1ubuntu2), dpkg-dev (= 1.14.13), dpkg-dev (= 1.14.14), dpkg-dev (<< 1.14.6)
Conflicts: dpkg-iasearch (<< 0.11), dpkg-static, sysvinit (<< 2.82-1)
Size: 2295850
Description: dpkg
Homepage: http://wiki.debian.org/Teams/Dpkg
Original-Maintainer: Dpkg Developers


Package: apt
Priority: important
Section: admin
Installed-Size: 5200
Maintainer: Ubuntu Core Developers
Architecture: i386
Version: 0.7.9ubuntu17.2
Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7)
Provides: libapt-pkg-libc6.7-6-4.6
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1-21), libstdc++6 (>= 4.2.1-4)
Recommends: ubuntu-keyring
Suggests: apt-doc, aptitude | synaptic | gnome-apt | wajig, bzip2, dpkg-dev, gnupg, lzma
Size: 1651326
Description: apt
Original-Maintainer: APT Development Team

Press F10 key and select Yes then prompted to Save.

Move cursor to status
Press F4

Enter the below info in file and ensure there is two blank lines at end of file:

Package: dpkg
Essential: yes
Status: install ok installed
Priority: required
Section: admin
Installed-Size: 7004
Origin: debian
Maintainer: Ubuntu Core Developers
Bugs: debbugs://bugs.debian.org
Architecture: i386
Version: 1.14.16.6ubuntu4
Replaces: dpkg-doc-ja, dpkg-static, manpages-de (<= 0.4-3), manpages-pl (<= 20051117-1)
Pre-Depends: coreutils (>= 5.93-1), libc6 (>= 2.4), lzma
Suggests: apt
Breaks: apt (<< 0.7.6ubuntu6), aptitude (<< 0.4.6.1-1ubuntu2), dpkg-dev (= 1.14.13), dpkg-dev (= 1.14.14), dpkg-dev (<< 1.14.6)
Conflicts: dpkg-iasearch (<< 0.11), dpkg-static, sysvinit (<< 2.82-1)
Description: dpkg
Homepage: http://wiki.debian.org/Teams/Dpkg
Original-Maintainer: Dpkg Developers

Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 5200
Maintainer: Ubuntu Core Developers
Architecture: i386
Version: 0.7.9ubuntu17.2
Replaces: libapt-pkg-dev (<< 0.3.7), libapt-pkg-doc (<< 0.3.7)
Provides: libapt-pkg-libc6.7-6-4.6
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1-21), libstdc++6 (>= 4.2.1-4)
Recommends: ubuntu-keyring
Suggests: apt-doc, aptitude | synaptic | gnome-apt | wajig, bzip2, dpkg-dev, gnupg, lzma
Description: apt
Original-Maintainer: APT Development Team

Press F10 and select Yes then prompted to Save.

type:
   
   apt-get update
   apt-get install debian-archive-keyring


You may have to type the below commands a few times to get all dependencies installed.

   apt-get update

or

   apt-get -f install

Once this is done, the public keys for repository will be installed. This can be viewed with the command:

   apt-key list

If everything works out, you should be able to install programs using apt.

WARNING: Please backup any personal files as installing programs via apt-get may break the os. The only way to fix this is to reinstll 3MX which will result in loss of data.

2 comments:

  1. Hello,

    I've tryed this post but i didn't work for me, I've post my problem at http://linuxplatformforum.ark2webdesign.co.uk/index.php/board,7.0.html and then the topic 'Install dpkg and/or apt-get on the EPC 700 with the 3MX-rc3 as distro'

    Please help me...

    ReplyDelete
  2. I'm just trying this in 2011. You need to get the package files from archive.debian.org now.

    The debian to patch file conversion script info is now here:
    http://code.google.com/p/cnm-minibook-tools/source/checkout

    Also the last line of the setup instructions should now be:
    echo deb http://archive.debian.org/debian/ etch main contrib non-free > /etc/apt/sources.list.d/sources.list

    With this, I now seem to have a working apt-get. At least it is now doing the first set of updates after asking for the keyring install.

    Thanks very much for the great instructions!!

    Stu (stuuu68@me.com)

    ReplyDelete