What to do with a .dsc file (dpkg)

My previous post (Nyancat and The Matrix on your terminal) talks about how you can install Nyancat. Let’s use that as an example to package a .dsc file.

BTW, if you just want nyancat on Ubuntu without packaging anything, you can install it via this command: sudo apt-get install nyancat

Back at the Launchpad page for Nyancat, I went to the latest upload (1.2.2-1) and downloaded all three files into one directory. The tar.gz files are required to package the .dsc file.

  • nyancat_1.2.2-1.dsc
  • nyancat_1.2.2.orig.tar.gz
  • nyancat_1.2.2-1.debian.tar.gz

Then I followed the steps on this linuxquestions.org thread about packaging and installing .dsc files on Linux.

For this, you’ll need to have dpkg. You can install it on Ubuntu via this command: sudo apt-get install dpkg-dev

Below are the commands I did to package the files.

dpkg-source -x nyancat_1.2.2-1.dsc
cd nyancat-1.2.2/
dpkg-buildpackage -rfakeroot -b
cd ..

Now if you ls you should see these three new files:

  • nyancat_1.2.2-1_amd64.changes
  • nyancat_1.2.2-1_amd64.deb
  • nyancat-server_1.2.2-1_all.deb

Pick either nyancat_1.2.2-1_amd64.deb or nyancat-server_1.2.2-1_all.deb to install.

Because I want the non-server version, I installed nyancat_1.2.2-1_amd64.deb:

sudo dpkg -i nyancat_1.2.2-1_amd64.deb

Now you can run nyancat!

One comment

  1. Steve says:


    I’m pretty new to building packages from source on Ubuntu and I think you just saved me so much time trying to figure out how to build all my packages!

    Thank you so much for this!

Leave a Reply

Your email address will not be published. Required fields are marked *