Skip to content

installation problem on clean system #2092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tim-salabim opened this issue Feb 3, 2023 · 6 comments
Closed

installation problem on clean system #2092

tim-salabim opened this issue Feb 3, 2023 · 6 comments

Comments

@tim-salabim
Copy link
Member

@edzer I just tried to install sf on a freshly installed Ubuntu 22.04 following the steps outlined in the README, i.e.

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev 

When running install.packages("sf") I get the following error:

Installing package into ‘/home/tim/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/sf_1.0-9.tar.gz'
Content type 'application/x-gzip' length 3480774 bytes (3.3 MB)
==================================================
downloaded 3.3 MB

* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.6.2
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc
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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /usr/share/gdal/pcs.csv readable... no
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... ./configure: line 3668: 15370 Segmentation fault      (core dumped) ./gdal_proj
no
configure: error: OGRCoordinateTransformation() does not return a coord.trans: PROJ not available?
ERROR: configuration failed for package ‘sf’
* removing ‘/home/tim/R/x86_64-pc-linux-gnu-library/4.2/sf’
Warning in install.packages :
 installation of package ‘sf’ had non-zero exit status

The downloaded source packages are in
   ‘/tmp/RtmpfJvP4W/downloaded_packages’

Am I missing something?

@edzer
Copy link
Member

edzer commented Feb 3, 2023

Is it possible that multiple versions of one of GDAL or PROJ are present?

@tim-salabim
Copy link
Member Author

This is what I see:

image

After purging I see nothing. After sudo apt install libgdal-dev I see those two pictured above

@edzer
Copy link
Member

edzer commented Feb 3, 2023

Yes, because

$ ls -la /bin
lrwxrwxrwx 1 root root 7 Dec 11  2020 /bin -> usr/bin

is a symbolic link.

@tim-salabim
Copy link
Member Author

So this is expected?

@edzer
Copy link
Member

edzer commented Feb 3, 2023

Wild guess, but would it help if you'd install libsqlite0-dev?

@tim-salabim
Copy link
Member Author

Yes! That solved it. Probably worth mentioning in the README?
Many thanks!

edzer added a commit that referenced this issue Feb 3, 2023
benz0li added a commit to b-data/r-docker-stack that referenced this issue Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants