7

My pi2 is installed with ubuntu-15.04-snappy-armhf-rpi2.img.gz, I want to install git in it but failed, here is info:

(RaspberryPi2)ubuntu@localhost:~$ sudo snappy install git
Installing git
git failed to install: snappy package not found

And because apt-get is not supported in ubuntu core, so I can not use it.

(RaspberryPi2)ubuntu@localhost:~$ sudo apt-get install git
Ubuntu Core does not use apt-get, see 'snappy --help'!
Liao Zhuodi
  • 225
  • 2
  • 6

2 Answers2

8

If you want to install git on Ubuntu Core you'll need to install it using apt. You can install classic in order to get it.

snap install classic --edge --devmode
sudo classic
sudo apt update
sudo apt install git

Unfortunately, with this solution, anytime you want to run git you will need to first run sudo classic

Source

Dehli
  • 181
  • 1
  • 5
5

I have not used Ubuntu Snappy, and that they decided to name the package manager snappy makes me cringe and want to throttle someone because of all the confusion that is bound to ensue in internet searches, etc. This one is even more dunder-headed than the Raspberry Pi Foundation's choice of model names.

But it still did not take to long to find this page, which indicates that snappy (the package manager) does have a search function:

snappy search git

Should show you all the packages with 'git' in their name. I bet snappy even has a man page (which, thanks to the name, I could not find). Try man snappy and see. If not, there is the already recommended to you snappy --help.

goldilocks
  • 60,325
  • 17
  • 117
  • 234