# Can not install linux soure

**URL:** <https://forum.legato.io/t/can-not-install-linux-soure/5608>\
**Category:** Legato Application Framework\
**Created:** [February 15, 2021, 1:44pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608 "2021-02-15T13:44:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcchurchill](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcchurchill](https://forum.legato.io/u/dcchurchill)\
**Post date:** [February 15, 2021, 1:44pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/1 "2021-02-15T13:44:28Z")

</div>

I’m trying to install the linux source for FX30-CATM (Release R11.0.0.007 + Legato 18.09.4) on Ubuntu 20.04 using the command: `leaf getsrc swi-linux` the install fails because the source references two packages that are no longer available: `python-git` and `repo`, so the install fails with:

```
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease                                  
Hit:6 https://downloads.sierrawireless.com/tools/debian release/ InRelease                        
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Note, selecting 'git' instead of 'git-core'
Package python-git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-git-doc

E: Package 'python-git' has no installation candidate
E: Unable to locate package repo
ERROR:
  Profile provisioning interrupted
CAUSED BY:
  Error while installing required packages (Error during sync step for swi-verify-aptdeps_1.6.191122 (command returned 100))

```

How can I install the linux source

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 15, 2021, 2:20pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/2 "2021-02-15T14:20:33Z")

</div>

how about getting the yocto source directly from here?  
[https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-16-components/#sthash.uALQ8N9h.dpbs](https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-16-components/#sthash.uALQ8N9h.dpbs)

---

<div class="post-metadata">

**Author:** ![dcchurchill](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcchurchill](https://forum.legato.io/u/dcchurchill)\
**Post date:** [February 15, 2021, 2:32pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/3 "2021-02-15T14:32:22Z")

</div>

Unfortunately I have a WP77 based Cat-M FX30, all the software for that device on SW’s site seem to be already compiled (\*.CWE) files. I need to be able to recompile the linux distro to enable some specific functionality. I was able to do this using leaf with the previous R9.x version but now I need some GPIO fixes in the R11 version.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 15, 2021, 2:39pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/4 "2021-02-15T14:39:20Z")

</div>

You can get the WP77 R11 yocto source here:  
[https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-release-11-components/#sthash.xB8xFhoC.dpbs](https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-release-11-components/#sthash.xB8xFhoC.dpbs)

here shows on fixing the repo:  
[https://www.xspdf.com/resolution/20120067.html](https://www.xspdf.com/resolution/20120067.html)

---

<div class="post-metadata">

**Author:** ![dcchurchill](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcchurchill](https://forum.legato.io/u/dcchurchill)\
**Post date:** [February 15, 2021, 7:22pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/5 "2021-02-15T19:22:50Z")

</div>

@jyijyi Thanks for the help, but I don’t think I can use the source you linked as it doesn’t have the `meta-columbia-x` recipes that are needed for the FX-30 device I’m using. I also couldn’t figure out how to make the repo fixes via the link you provided.

I decided to go back to the same version of linux that I had successfully built the R9 sources on: Ubuntu 16.04. I now get further but get a different error when I use the `leaf getsrc` command:

```
Run sync steps for fx30-catm-linux-src_R11.0.0.007

Ready to sync in /home/<mylinuxuser>/myWorkspace/swi-linux-src directory:
repo init -u ssh://<myusername>@gerrit.legato.io:29418/manifest -m mdm9x06/tags/SWI9X06Y_02.22.12.00/linux.xml -g default,-cache ; repo sync

Proceed? (Y/n)
Y
Checking credentials...
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Counting objects: 2, done
remote: Finding sources: 100% (64/64)
remote: Total 64 (delta 25), reused 64 (delta 25)
Unpacking objects: 100% (64/64), done.
From https://gerrit.googlesource.com/git-repo
   2a2da80..21dce3d main -> origin/main
 * [new tag] v2.12.1 -> v2.12.1
 * [new tag] v2.12.2 -> v2.12.2
  File "/home/<mylinuxuser>/myWorkspace/swi-linux-src/.repo/repo/main.py", line 79
    file=sys.stderr)
        ^
SyntaxError: invalid syntax
ERROR:
  Something went wrong with `repo` command

```

I’m also posting this on Sierra Wireless Forums as I’m not sure which is the best audience for this issue.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 16, 2021, 12:15am UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/6 "2021-02-16T00:15:38Z")

</div>

Seems there is some problem on your python version, I am using the following on Ubuntu 16.04 and I can download the yocto source of swi-fx30-catm\_2.0.0 by Leaf:

python3 --version  
Python 3.6.12

---

<div class="post-metadata">

**Author:** ![dcchurchill](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcchurchill](https://forum.legato.io/u/dcchurchill)\
**Post date:** [February 16, 2021, 3:37pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/7 "2021-02-16T15:37:46Z")

</div>

I’ve tried that python version and still no success although the errors received are different. Also have tried Ubuntu 18.04 and received the same errors.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 16, 2021, 3:38pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/8 "2021-02-16T15:38:53Z")

</div>

seems some problem on your ubuntu PC with repo or python…

---

<div class="post-metadata">

**Author:** ![dcchurchill](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dcchurchill](https://forum.legato.io/u/dcchurchill)\
**Post date:** [February 16, 2021, 6:57pm UTC](https://forum.legato.io/t/can-not-install-linux-soure/5608/9 "2021-02-16T18:57:19Z")

</div>

Finally got this to work! In case anyone’s interested here was my solution:

Set python symbolic link to point to python 3:  
`sudo rm /usr/bin/python`  
`sudo ln -s /usr/bin/python3 /usr/bin/python`

Back-up copy of /usr/bin/repo:  
`sudo cp /usr/bin/repo /usr/bin/repo.bak`

Download copy of `repo` from [https://storage.googleapis.com/git-repo-downloads/repo](https://storage.googleapis.com/git-repo-downloads/repo) to `/usr/bin/repo` replacing original `/usr/bin/repo`

Ran `leaf getsrc swi-linux` and got this error:

```
Downloading manifest from ssh://david.churchill@thingtech.com@gerrit.legato.io:29418/manifest
Traceback (most recent call last):
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
    _Main(sys.argv[1:])
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
    result = run()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 519, in Execute
    self._SyncManifest(opt)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 220, in _SyncManifest
    default_branch = m.ResolveRemoteHead()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 1914, in ResolveRemoteHead
    output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD')
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3034, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests ls-remote: usage: git ls-remote [--heads] [--tags] [--upload-pack=<exec>]
                     [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]

```

Opened `/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py` and put the following line in at line #3026:`print("Name: {} args: {}".format(name, args))`

Re-ran leaf getsrc swi-linux and got this error:

```
Name: var args: ('GIT_COMMITTER_IDENT',)
Traceback (most recent call last):
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
    _Main(sys.argv[1:])
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
    result = run()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 524, in Execute
    self._ConfigureUser(opt)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 380, in _ConfigureUser
    name = self._Prompt('Your Name', mp.UserName)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 613, in UserName
    self._LoadUserIdentity()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 626, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3035, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests var: 
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'dcchurchill@ubuntu.(none)')

```

Ran (with my actual e-mail and name):  
`git config --global user.email "you@example.com"`  
`git config --global user.name "Your Name"`

Ran `leaf getsrc swi-linux` one more time and it worked!
