3

I've got a nice little BQ Aquaris E4.5 Ubuntu Edition here and I'm trying it out. Is there a sensible way to install Git on it? It doesn't appear to be available via the default repositories.

muru
  • 197,895
  • 55
  • 485
  • 740
d3pd
  • 3,661

2 Answers2

0

Easiest way I found so far is to just download the armhf build of git from launchpad, extract it on my desktop and copy the contents to my phone. Then I can just run the git binary from where I have it copied to.

The latest armhf builds for git can be found here:

https://launchpad.net/ubuntu/utopic/armhf/git/

Download the deb of one of the builds and extract it (either with file-roller or with dpkg -x). After you extracted the deb, you'll have, among others, a usr/ dir which should contain everything you need to run git.

Upload that dir to your phone, so that its in your home, then just run

/home/phablet/usr/bin/git

and it should work. It'll complain about not finding templates when you do git init, but you can run it with

env GIT_TEMPLATE_DIR=/home/phablet/usr/share/git-core/templates /home/phablet/usr/bin/git init

to fix that problem.

If you don't want to type the full path every time you want to run git, you can set an alias in your .bashrc:

alias git=/home/phablet/usr/bin/git
rakete
  • 403
  • Thank you very much for your help on this! This looks promising. I've followed your instructions, but have run into a problem actually executing the git executable. When I try to run it with the standard user or sudo, I get Permission denied. I note that the file's permissions are -rwxr-xr-x. Would you happen to know what to try next? – d3pd May 02 '15 at 09:00
  • Ah, thats interesting. I only used git over ssh so far, and then it works. Now I just tried to run git with the terminal on the phone, and then I get the same error. So, I don't really now what the problem is yet. Here is a related question: http://askubuntu.com/questions/556041/why-ubuntu-touch-terminal-cannot-execute-app – rakete May 09 '15 at 14:27
  • Just answered the other question which also applies here. In short: apparmor prevents the terminal from executing arbitrary binaries, you can work around that by changing its apparmor profile. – rakete May 09 '15 at 15:20
0

Try unlocking the Ubuntu file system first:

$ sudo mount -o remount, rw /

Then deleting the lock files to install applications:

$ sudo rm -f  /var/lib/apt/lists/lock
$ sudo rm -f /var/lib/dpkg/lock
Rinzwind
  • 299,756
James Hill
  • 59
  • 4
  • Using the word "try" makes this a comment not an answer ;-) – Rinzwind May 04 '15 at 07:14
  • Hey there. Thanks for your help. I've tried your suggestions, but I'm still getting a permission denied message when I try to execute. I've tried also the command sudo mount -o remount, exec /, but this didn't work either. Would you have any ideas on how to proceed? – d3pd May 04 '15 at 10:13
  • Rinzwind over to you ;) – James Hill May 05 '15 at 23:11