How to install basic package on snappy Ubuntu core, like nano git wget etc.

I tried the dpkg -i ***.deb ,but there are also need some dependent packages


The workaround posted by Lin is fine on 15.04 but in 16.04 LTS you will have a different mechanism, called the 'classic dimension', that will give you a traditional deb based filesystem alongside the snappy filesystems. That way you can use git or other tools on a snappy system and pop back and forth between the snappy and classic dimensions.

| improve this answer | |
  • what are the mount points of the classic and snap filesystems in each others 'dimensions'? – DeepSpace101 May 18 '18 at 21:43

If there is no such snap available (search it with snappy search NAME), you will need to install it with the .deb package. And you will need to install all the other necessary packages as well.

For example, if you want to install git on it, you will need these packages:

git-man (>> 1:2.1.4)
git-man (<< 1:2.1.4-.)
libc6 (>= 2.16)
libcurl3-gnutls (>= 7.16.2)
libexpat1 (>= 2.0.1)
zlib1g (>= 1:1.2.0)

(liberror-perl depends on perl, you will need that as well)

You can find the dependency from the "Package relationship" section of git project page on launchpad, just download all these .deb packages and put them on your system:

(amd64)ubuntu@localhost:~/git$ ls
git-man_2.1.4-2.1_all.deb                    liberror-perl_0.17-1.1_all.deb        perl_5.20.2-2_amd64.deb
git_2.1.4-2.1_amd64.deb                      libexpat1_2.1.0-6ubuntu1.1_amd64.deb  zlib1g_1.2.8.dfsg-2ubuntu1_amd64.deb
libc6_2.21-0ubuntu4_amd64.deb                libpcre3_8.35-3.3ubuntu1.1_amd64.deb
libcurl3-gnutls_7.38.0-3ubuntu2.2_amd64.deb  perl-modules_5.20.2-2_all.deb

And install them on your snappy Ubuntu Core:

sudo mount -o remount,rw /; sudo dpkg -i *.deb

That's it!

(amd64)ubuntu@localhost:~/git$ git --version
git version 2.1.4
| improve this answer | |
  • sudo mount -o remount,rw /; sudo dpkg -i *.deb potentially breaks the system. – sergiusens Nov 12 '15 at 13:37
  • @sergiusens you mean the remount part or the installation part? Maybe I should add another line for reminding people to remount it back to read-only with sudo mount -o remount,ro / – P.-H. Lin Nov 13 '15 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.