-
Notifications
You must be signed in to change notification settings - Fork 301
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
configure: error: pcs.csv not found in GDAL data directory. #921
Comments
IIRC, you can set the environment variable |
Hi @edzer . I thought I had done so, but on checking I hadn't removed the gdal-data library. Which I have now done, and installed 2.2 . But sf still won't install properly. Any ideas please?
It looks like perhaps it's similar to this issue...?#40 |
To me it looks most like #844; see also the README.md of this repo, paragraph on "Multiple GDAL, GEOS and/or PROJ versions on your system". |
Thanks will check those out. |
It does indeed look like I have multiple GEOS on my system .
I'm too novice to understand how to fix this though. Could you point me towards the best place to ask for help please? (as I appreciate this isn't a SF problem). |
If removing packages on your system doesn't remove everything, I'm afraid the only thing you can do is remove offending files by hand. There are a number of docker files that may be helpful creating more controlled systems. |
Strange, I've now removed multiple versions of geos but still get the same issue.
Checking versions
|
You're looking for binaries, where you should be looking for dynamic libraries. |
Oh. I don't know how to do that. :-( I'm very aware that I'm being a drag on your time, so I'm really sorry, but could you advise on how to proceed? I managed to do this though, maybe it helps?
I guess the issue is that I have duplicate items on the left of this, pointing at different items on the right. I guess I can delete some of the items on the right? |
No, I'm sorry. |
Now solved. Uninstalled and reinstalled lots of packages. Not quite sure what did the trick, but rgdal and sf will now install. Thanks for your efforts anyway edzer. |
For what it's worth, though I am not sure if this hack is a really good idea. At the moment, I am trying to run QGIS3 on Ubuntu 18.04. At the same time I would like to have rgdal and sf available within R. For the latter I would need to run gdalinfo --version
GDAL 2.2.3, released 2017/11/20 Trying to install rgdal, leads to the error message as pointed out by @JimShady at the beginning of this issue. install.packages("rgdal")
# not all output shown
...
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.2.3
checking GDAL version >= 1.11.4... yes
checking gdal: linking with --libs only... yes
checking GDAL: /usr/share/gdal/2.2/pcs.csv readable... no
configure: error: pcs.csv not found in GDAL data directory.
ERROR: configuration failed for package ‘rgdal’
... Apparently, the sudo mkdir /usr/share/gdal/2.2
sudo cp /usr/share/gdal/pcs.csv /usr/share/gdal/2.2/pcs.csv This let's you run Sys.setenv("GDAL_DATA"="/usr/share/gdal")
install.packages("sf") |
Hmm. I also run QGIS3 . I didn't realise the issue was linked to that, but maybe it was. |
Are you (both) installing from PPA ubuntugis-unstable, and does QGIS3 also come from there? |
This is how I installed QGIS3: # add QGIS repository for Ubuntu 18.04 to sources.list
sudo sh -c 'echo "deb http://qgis.org/debian bionic main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://qgis.org/debian bionic main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu bionic main" >> /etc/apt/sources.list'
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
# install aptitude to cleverly solve dependency issues
sudo apt-get install aptitude
sudo aptitude install qgis python-qgis qgis-plugin-grass The first thing to note is that in the meantime, http://qgis.org/ubuntu is also available, so I should have used this repository instead of http://qgis.org/debian. Not sure if that would have solved the problem already, but I guess not. |
In the rgdal case, we trust what
returns. If GDAL was installed such that |
rgdal on R-Forge svn revision 778 package version 1.3-8 now tests for the |
@rsbivand thanks! In fact, @edzer I have now installed both QGIS3 and GDAL from PPA ubuntugis-unstable. QGIS3 is still using GDAL 2.2.3, hence, the problem persists, but for the time being, I have a work around and sooner or later they will update to GDAL 2.3, I guess. In any case, I wish you both a Happy New Year! |
I too had issues with having QGIS 3.4 and
The trick suggested by @jannes-m also solved the issue for me -
|
Please never use tricks. Do feed back upstream to the packager who is having GDAL_DATA (or |
@rsbivand I understand, thanks. |
I'm using ubuntu 20.04 with R 4.0. New computer so shouldn't be old versions of gdal around. Reading the chain of comments above and the errors that came from trying to install rgdal, sf, etc.. I discovered that there were no copies of pcs.csv on my computer. proj-bin is at version 6.3.1-1, gdalinfo says the version is gdal 3.0.4. I have a mac with a similar set up. It did have copies of pcs.csv. So I copied one to my ubuntu machine and put it in/usr/share/gdal/. I still get failures installing. The error messages involve dbWriteTable. and report double free or corruption (!prev). But thought it might be useful to report the missing pcs.csv file |
I have the below package installed but still getting the error with the missing pcs.csv file. i searched a lot but could not find the solution of this problem Installed Packages |
GDAL 2.* need |
Evening,
Any ideas on the below would be great please. sf can't find pcs.csv .
Running gdal-config --datadir gives me
However that directory does not exist. I previously installed GDAL 2.6 from NextGIS but then removed it as it was conflicting with something else. This
I'm in a bit of a pickle . How can I 'create' a 2.2 folder in the share/gdal folder? Why wasn't it made when I installed GDAL 2.2 from ubuntugis/unstable ?
Thanks
James
The text was updated successfully, but these errors were encountered: