[R-sig-Geo] Installation of proj4 v6 on Ubuntu 18.04 Error: proj/epsg not found
Tomislav Hengl
tom@heng| @end|ng |rom gm@||@com
Tue Oct 29 17:56:21 CET 2019
I get:
$ pkg-config proj --libs
-lproj
$ pkg-config proj --cflags
*empty output
On 10/29/19 2:01 PM, Edzer Pebesma wrote:
> Would you mind giving the ouptut of:
>
> pkg-config proj --libs
> pkg-config proj --cflags
>
> and also try:
>
> install.packages("rgdal", repos="http://R-Forge.R-project.org")
>
> On 10/29/19 7:11 AM, Tomislav Hengl wrote:
>>
>> Thanks Edzer,
>>
>> I removed my gdal (which removes also all QGIS and everything connect
>> unfortunately) then I followed your steps and I get (somehow the proj
>> version is still 5 and not 6):
>>
>>> install.packages("rgdal")
>> % Total % Received % Xferd Average Speed Time Time Time
>> Current
>> Dload Upload Total Spent Left
>> Speed
>> 100 1631k 100 1631k 0 0 713k 0 0:00:02 0:00:02 --:--:--
>> 713k
>> * installing *source* package ‘rgdal’ ...
>> ** package ‘rgdal’ successfully unpacked and MD5 sums checked
>> checking for g++... g++
>> checking whether the C++ compiler works... yes
>> checking for C++ compiler default output file name... a.out
>> checking for suffix of executables...
>> checking whether we are cross compiling... no
>> checking for suffix of object files... o
>> checking whether we are using the GNU C++ compiler... yes
>> checking whether g++ accepts -g... yes
>> configure: CC: gcc -std=gnu99
>> configure: CXX: g++
>> configure: rgdal: 1.3-3
>> checking for /usr/bin/svnversion... yes
>> configure: svn revision: 759
>> checking whether g++ supports C++11 features by default... yes
>> configure: C++11 support available
>> checking for gdal-config... /usr/bin/gdal-config
>> checking gdal-config usability... yes
>> configure: GDAL: 2.4.2
>> checking C++11 support for GDAL >= 2.3.0... yes
>> checking GDAL version >= 1.11.4... yes
>> checking gdal: linking with --libs only... yes
>> checking GDAL: /usr/share/gdal/pcs.csv readable... yes
>> configure: pkg-config proj exists, will use it
>> configure: PROJ version: 5.2.0
>> checking proj_api.h presence and usability... no
>> configure: error: proj_api.h not found in standard or given locations.
>> ERROR: configuration failed for package ‘rgdal’
>> * removing ‘/opt/microsoft/ropen/3.5.1/lib64/R/library/rgdal’
>> * restoring previous ‘/opt/microsoft/ropen/3.5.1/lib64/R/library/rgdal’
>>
>> The downloaded source packages are in
>> ‘/data/RTMP/Rtmpl5wj21/downloaded_packages’
>> Updating HTML index of packages in '.Library'
>> Making 'packages.html' ... done
>> Warning message:
>> In install.packages("rgdal") :
>> installation of package ‘rgdal’ had non-zero exit status
>>
>> what am I doing wrong?
>>
>>
>> On 10/28/19 10:36 PM, Edzer Pebesma wrote:
>>> Hi Tom,
>>>
>>> formerly PROJ.4 is now called PROJ.
>>>
>>> Have you also tried the usual ubuntu install suggestions we give to
>>> R/ubuntu users, e.g. on https://github.com/r-spatial/sf ?
>>>
>>> They are:
>>>
>>> sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
>>> sudo apt-get update
>>> sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev
>>>
>>> On 10/28/19 4:34 PM, Tomislav Hengl wrote:
>>>>
>>>> Dear R-sig-geo,
>>>>
>>>> I am trying to install proj4 v6 on Ubuntu 18.04 bionic. I though I can
>>>> install it simply by following the ubuntugis steps
>>>> (https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html)
>>>>
>>>> but this does not lead to newest version of proj4 v6.
>>>>
>>>> Then I have tried to follow the proj6 steps
>>>> (https://proj.org/install.html#install) which indicate that I should do
>>>> it via the Anaconda installer. After I installed proj4 v6 from conda
>>>> I get:
>>>>
>>>> $ which proj
>>>> /home/tomislav/anaconda2/bin/proj
>>>>
>>>> $ proj -V
>>>> Rel. 6.2.0, September 1st, 2019
>>>> <proj>:
>>>> projection initialization failure
>>>> cause: no arguments in initialization list
>>>> program abnormally terminated
>>>>
>>>> After that I've added the 'PROJ_LIB = /home/tomislav/anaconda2/bin/proj
>>>> ' to my .Renviron file and then I get:
>>>>
>>>> install.packages("rgdal")
>>>> Installing package into
>>>> ‘/home/tomislav/R/x86_64-pc-linux-gnu-library/3.5’
>>>> (as ‘lib’ is unspecified)
>>>> ...
>>>> checking PROJ.4: epsg found and readable... no
>>>> Error: proj/epsg not found
>>>> Either install missing proj support files, for example
>>>> the proj-nad and proj-epsg RPMs on systems using RPMs,
>>>> or if installed but not autodetected, set PROJ_LIB to the
>>>> correct path, and if need be use the --with-proj-share=
>>>> configure argument.
>>>> ERROR: configuration failed for package ‘rgdal’
>>>> * removing ‘/home/tomislav/R/x86_64-pc-linux-gnu-library/3.5/rgdal’
>>>> Warning in install.packages :
>>>> installation of package ‘rgdal’ had non-zero exit status
>>>>
>>>> $gdalinfo --version
>>>> GDAL 2.4.0, released 2018/12/14
>>>>
>>>> What am I doing wrong? Which tutorial / documentation do you advise to
>>>> install proj4 v6 and rgdal package on Ubuntu?
>>>>
>>>> thank you (especially you Roger!),
>>>>
>>>> T. Hengl
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> R-sig-Geo using r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo using r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>
More information about the R-sig-Geo
mailing list