[GRASS-dev] g.extension problem on Linux
Markus Neteler
neteler at osgeo.org
Wed Dec 2 11:40:52 PST 2020
Hi,
On Tue, Dec 1, 2020 at 10:16 PM Robert Lagacé
<robert.lagace.qc at gmail.com> wrote:
>
> I run Grass 7.8.4 on Ubuntu 18.04
>
> I cannot install extension with g.extension. Follow the message from the
> console :
>
> g.extension --verbose extension=r.stream.basins
> Fetching <r.stream.basins> from GRASS GIS Addons repository (be patient)...
> Downloading source code for <r.stream.basins> from
> <https://github.com/OSGeo/grass-addons/trunk/grass7/raster/r.stream.basins>
> which is identified as 'official' type of source...
> Traceback (most recent call last):
> File "/usr/lib/grass78/scripts/g.extension", line 2183, in
> <module>
> sys.exit(main())
> File "/usr/lib/grass78/scripts/g.extension", line 2163, in
> main
> install_extension(source=source, url=url, xmlurl=xmlurl)
> File "/usr/lib/grass78/scripts/g.extension", line 765, in
> install_extension
> source=source, url=url)
> File "/usr/lib/grass78/scripts/g.extension", line 1406, in
> install_extension_std_platforms
> outdev=outdev, directory=srcdir, tmpdir=TMPDIR)
> File "/usr/lib/grass78/scripts/g.extension", line 1346, in
> download_source_code
> download_source_code_official_github(url, name, outdev,
> directory)
> File "/usr/lib/grass78/scripts/g.extension", line 1229, in
> download_source_code_official_github
> url, directory], stdout=outdev) != 0:
> File "/usr/lib/grass78/etc/python/grass/script/core.py",
> line 74, in call
> return Popen(*args, **kwargs).wait()
> File "/usr/lib/grass78/etc/python/grass/script/core.py",
> line 63, in __init__
> subprocess.Popen.__init__(self, args, **kwargs)
> File "/usr/lib/python3.6/subprocess.py", line 729, in
> __init__
> restore_signals, start_new_session)
> File "/usr/lib/python3.6/subprocess.py", line 1364, in
> _execute_child
> raise child_exception_type(errno_num, err_msg,
> err_filename)
> FileNotFoundError: [Errno 2] No such file or directory:
> 'svn': 'svn'
Do you have `svn` installed?
If not:
`apt-get install subversion`
Rationale: while it sounds ridiculous to still require the `svn`
program when installing addons from GitHub it is the only way we found
so far to check-out a subdirectory from GitHub (given that the
official addons are all together in one repository). Better ideas are
most welcome!
In any case, I guess we need to add a test here:
https://github.com/anikaweinmann/grass/blob/14ac3a763cf386b552eadae91d6754d898a6a5cc/scripts/g.extension/g.extension.py#L179
for prog in ('make', 'gcc'):
which would complete the original https://github.com/OSGeo/grass/pull/39
Markus
More information about the grass-dev
mailing list