Getting APT on Damn Small Linux, in 2016

I wanted to give Damn Small Linux (referred to as DSL for the rest of this post) a quick whirl since I got bored, and successfully got it on a hard drive. And I saw I could install apt.

But, with such an out of date OS, there were bound to be problems. The largest problem I had was that the 2 APT mirrors I found were down. But, I got a bit creative, downloaded the dsl-dpkg and MD5 checksums, uploaded them to here, so now, here’s the updated 2016 tutorial, on how to get APT working on Damn Small Linux. The easy way.

Disclaimer: This was performed on DSL 4.4.10. It may be way different for older editions of DSL!

 

First, a few things you’ll need to do before getting started. If you haven’t already, set a root password, as it simplifies the process greatly when you get things working. Enter the terminal, and change the password by doing this command:

su root

And the entire little program will help you through setting a root password. To successfully check if you did it right, type in this command:

su

And if you did it right, you should see this in your command prompt:

root@box:~#

(where it says box, that may be different, depending on your hostname.)

 

Next, it’s time to modify the hosts for downloading dpkg. Do this by entering this command as root:

nano /opt/.dslrc

On line one of the file, change the line to this:

Mirror: distro.ibiblio.org/damnsmall

Keep the second line set to http.

(I’ve ended support for my DSL mirror, and I instead recommend you use ibiblio’s mirror instead.)

To exit out of nano, type in Control-O, then Control-M, and lastly, Control-X.

Next, right click on your desktop. Navigate into the folder called “Apps”, then to the folder called “Tools”, and click on the problem “Enable Apt” again.

APT should be downloaded to your computer now. To verify, as root, type in this command:

apt-get install

And there you have it, but almost. Since the default sources have barely any packages, let’s make it so you have tons of packages available to download.

 

 

As root, type in this command:

nano /etc/apt/sources.list

And on lines 2-4, replace them with this:

deb http://mirror.aarnet.edu.au/debian stable main contrib non-free
deb http://mirror.linux.org.au/debian stable main contrib non-free
line 4 is now empty, so put nothing on line 4 replacing the usc.edu source.

Be sure to remove the hashtags, as not removing them renders the sources invalid!

When exiting, be sure to do Control-O, Control-M, and then Control-X.

 

Once you are all done, go ahead, and run apt-get update as root.

But, there’s yet ANOTHER problem you’ll run into, and you’ll likely get an error with the Dynamic MMap running out of room. How do you fix that you ask? And this part, believe me, is a nightmare to deal with.

Here’s how:

First, nano into the file that sets the Dynamic MMap (the apt cache):

nano /etc/apt/apt.conf

Next, on line 2, modify the number set in the APT Cache-Limit. This number is in bytes, so be reminded of that. For this tutorial, let’s use around 128 MB of memory. Set line 2 to this:

APT::Cache-Limit "1280000000";

Go ahead and save the file. You probably know how to at this point. Next, type in this command:

nano /etc/apt/apt.conf.d/70debconf

And add a new line with these contents:

APT::Cache-Limit "1280000000";

Go ahead and type in apt-get update again. If all goes well, you should get no errors with APT.

And that is how you fix APT on Damn Small Linux, so you can install all of your packages.

 

If you do have readlink problems with packages, I’ll be explaining that whole procedure in yet another post. The post after this one, of course.

4 Responses to “Getting APT on Damn Small Linux, in 2016

  • Chet Creider
    6 years ago

    Thanks for this post which worked mostly for me. However, I’m still unable to download packages because
    (1) gzip at the 2nd mirror site “returns error code (1)” and
    (2) none of the source listing files are at the mirror sites

    Any idea what is wrong?

    P.S. I only want a gcc-compiler, gcc headers and ncurses

    Thanks,

    Chet Creider
    Canada

    • Hey,
      Somehow WordPress didn’t like my other comment, but that’s fine.

      Anyways, for your issues, and that you want a gcc-complier, gcc header, and ncurses, hopefully I have a few solutions.

      First off, Damn Small Linux has something called myDSL extensions, which are pretty much native extensions to DSL. They do have a gcc extension for Damn Small Linux. While it was last updated in 2008, it should work. Go ahead and download this: http://distro.ibiblio.org/damnsmall/mydsl/system/gcc1-with-libs.dsl to your DSL VM or machine.

      Next, go ahead and type in this command:
      mydsl-load /path/to/where/the/extension/is

      And it should install.

      For ncurses, you can find downloads on this page:
      https://ftp.gnu.org/pub/gnu/ncurses/

      You should probably download ncurses 5.7, since it falls in line with when DSL 4.4.10 was released.

      For the gzip issue, go ahead and try these commands out:
      apt-get install –reinstall gzip (this might not work, since DSL’s APT is really old. If it doesn’t, try apt-get remove gzip, then apt-get install gzip.)
      apt-get clean
      apt-get update
      apt-get upgrade
      apt-get dist-upgrade

      If that doesn’t work, in the tutorial, try raising the cache size of APT, up from what it is in the tutorial.

      And if this all doesn’t work, probably an alternative source is the way to go.

      Hope this helps with your issues. Comment back if you have any more issues. 🙂

      PS: How’s the maple syrup up in Canada? In the US, it’s…well…not the greatest…

  • Corey Bruce
    6 years ago

    404 error with your mirror

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.