Rolf Turner
2016-Oct-04 21:54 UTC
[R-sig-Debian] Problem installing rgdal on a laptop running Ubuntu 16.04.1
I previously sent a cri de coeur about this problem to the r-help list but so far have not managed to extract a solution. So I am trying here. (Uh, Ubuntu *is* a "special instance" of Debian, isn't it?) The problem is that I cannot install rgdal, and I need it. Rather desperately. I do: install.packages("rgdal",lib="/home/rolf/Rlib") and get the error message:> ** testing if installed package can be loaded > Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so': > /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: CPLQuietErrorHandler > Error: loading failed > Execution haltedI have installed libgdal-dev and (later, prompted by an email from Prof. John Nash) libgdal1-dev. I also have installed libproj-dev, as instructed by one site that I found by googling around. No joy. I have also gone to the Ubuntu Launchpad site and looked at the material there, but could not make any sense of it nor was I able to discern how to make use of that material. I also tried installing gdal-bin as suggested by one site that I looked at; no help. Can anyone point me in the right direction? cheers, Rolf Turner P. S. For what it's worth: my sessionInfo(): R version 3.3.1 (2016-06-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.1 LTS locale: [1] LC_CTYPE=en_NZ.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_NZ.UTF-8 LC_COLLATE=en_NZ.UTF-8 [5] LC_MONETARY=en_NZ.UTF-8 LC_MESSAGES=en_NZ.UTF-8 [7] LC_PAPER=en_NZ.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] fortunes_1.5-4 misc_0.0-16 loaded via a namespace (and not attached): [1] deldir_0.1-13 Matrix_1.2-3 tools_3.3.1 [4] mgcv_1.8-12 abind_1.4-3 spatstat_1.46-1.059 [7] rpart_4.1-10 nlme_3.1-128 grid_3.3.1 [10] polyclip_1.5-0 lattice_0.20-33 goftest_1.0-3 [13] tensor_1.5 R. T. -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Michael Rutter
2016-Oct-04 22:12 UTC
[R-sig-Debian] Problem installing rgdal on a laptop running Ubuntu 16.04.1
On 10/04/2016 05:54 PM, Rolf Turner wrote:> > I previously sent a cri de coeur about this problem to the r-help list > but so far have not managed to extract a solution. So I am trying here. > (Uh, Ubuntu *is* a "special instance" of Debian, isn't it?) > > The problem is that I cannot install rgdal, and I need it. Rather > desperately. > > I do: > > install.packages("rgdal",lib="/home/rolf/Rlib") > > and get the error message: > >> ** testing if installed package can be loaded >> Error in dyn.load(file, DLLpath = DLLpath, ...) : >> unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so': >> /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: >> CPLQuietErrorHandler >> Error: loading failed >> Execution halted >Rolf, I would go to the cran2deb4ubuntu PPA and install r-cran-gdal from there. It will install all the needed dependencies. https://launchpad.net/~marutter/+archive/ubuntu/c2d4u Michael
Rolf Turner
2016-Oct-04 23:06 UTC
[R-sig-Debian] [FORGED] Re: Problem installing rgdal on a laptop running Ubuntu 16.04.1
On 05/10/16 11:12, Michael Rutter wrote: <SNIP>> I would go to the cran2deb4ubuntu PPA and install r-cran-gdal from > there. It will install all the needed dependencies. > > https://launchpad.net/~marutter/+archive/ubuntu/c2d4uSorry to be a thicko, but you will have to spell things out for me a bit more. I did:> sudo add-apt-repository ppa:marutter/c2d4u > sudo apt-get updatesuccessfully (I think!). Then I tried sudo apt-get install r-cran-gdal and got:> E: Unable to locate package r-cran-gdalSo what should I have said or done? Thanks. cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Rolf Turner
2016-Oct-04 23:16 UTC
[R-sig-Debian] [FORGED] Re: Problem installing rgdal on a laptop running Ubuntu 16.04.1
On 05/10/16 12:07, Michael Rutter wrote:> Typo on my part. Try r-cran-rgdal.Thanks. OK, I have now done sudo apt-get install r-cran-rgdal successfully. But sad to say, it didn't help a bit. When I try install.packages("rgdal",lib="/home/rolf/Rlib") I get exactly the same error as before. I.e. > undefined symbol: CPLQuietErrorHandler Why do these things always happen to *me*? Said he, plaintively. cheers (not very cheerily), Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Dirk Eddelbuettel
2016-Oct-04 23:39 UTC
[R-sig-Debian] [FORGED] Re: Problem installing rgdal on a laptop running Ubuntu 16.04.1
On 5 October 2016 at 12:16, Rolf Turner wrote: | | On 05/10/16 12:07, Michael Rutter wrote: | | > Typo on my part. Try r-cran-rgdal. | | Thanks. OK, I have now done | | sudo apt-get install r-cran-rgdal | | successfully. Very good. Now do IP <- installed.packages() and convince yourself that you have rgdal. You could even do library(rgdal) | But sad to say, it didn't help a bit. When I try | | install.packages("rgdal",lib="/home/rolf/Rlib") | | I get exactly the same error as before. I.e. | | > undefined symbol: CPLQuietErrorHandler Computers have that silly habit of being deterministic. _Installing from source another time_ does not change the fact that you did not have your ducks in a row in the first place. We did not change that; Michael merely pointed you to a different pond with different ducks, ready to roast. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Rolf Turner
2016-Oct-17 09:07 UTC
[R-sig-Debian] Problem installing rgdal on a laptop running Ubuntu 16.04.1
> On 10/04/2016 05:54 PM, Rolf Turner wrote: >> >> I previously sent a cri de coeur about this problem to the r-help list >> but so far have not managed to extract a solution. So I am trying here. >> (Uh, Ubuntu *is* a "special instance" of Debian, isn't it?) >> >> The problem is that I cannot install rgdal, and I need it. Rather >> desperately. >> >> I do: >> >> install.packages("rgdal",lib="/home/rolf/Rlib") >> >> and get the error message: >> >>> ** testing if installed package can be loaded >>> Error in dyn.load(file, DLLpath = DLLpath, ...) : >>> unable to load shared object '/home/rolf/Rlib/rgdal/libs/rgdal.so': >>> /home/rolf/Rlib/rgdal/libs/rgdal.so: undefined symbol: >>> CPLQuietErrorHandler >>> Error: loading failed >>> Execution haltedSince I (in my desperation) cross-posted to r-sig-debian and r-help, I am sending this "SOLVED" message to both lists. The solution took a long while to find, but in the end it was very simple. Quite a while back I was having problems with installing some package (I *think* it was one of my own packages, hmm.discnp), and someone (the details are lost in the mists of time) advised me to create a directory ".R" in my home directory and in it place a file "Makevars" containing the lines:> FCFLAGS = -g -O2 -mtune=native -fbounds-check > FFLAGS = -g -O2 -mtune=native -fbounds-check > PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)This solved the problem that I was having at that time. I had long forgotten the directory ".R" and *that* was what was causing the problem. A *very* clever and knowledgeable young Linux whiz, who kindly agreed to help me with this problem, eventually tracked down the fact that it originated from ".R". When I removed ".R", the problem with rgdal (and problems with several other packages, that subsequently surfaced) went away. My system is now humming away smoothly. Thanks to everyone who (futilely!) attempted to help me out. cheers, Rolf Turner -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276