Proj is not compatible

Hi,

I am testing geo. here is Cargo.toml

[dependencies]
shapefile = "0.5.0"
geo = "0.21.0"
geo-types = "0.7.12"
proj = "0.27.1"
wkt = "0.10.3"
  pkg-config unable to find existing libproj installation: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "proj" "proj >= 9.2.0"` did not exit successfully: exit status: 1
  error: could not find system library 'proj' required by the 'proj-sys' crate

  --- stderr
  Package dependency requirement 'proj >= 9.2.0' could not be satisfied.
  Package 'proj' has version '9.1.1', required version is '>= 9.2.0'

  building libproj from source
  disabling tiff support
  thread 'main' panicked at /home/doga/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  failed to execute command: Permission denied (os error 13)

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

How can I solve the problem?

Regards

Looks to me like your proj-sys dependency is having trouble installing libproj from source, because it gets a permission denied error. As to why it gets that error, I don't know. From your log message I deduce that you have PROJ v9.1.1 installed on your computer? proj-sys does not accept this version though, as it needs PROJ to be at least v9.2.0 You could try and update your PROJ installation manually to v9.2.0 or v9.3.0, that way proj-sys can use the existing PROJ installation, instead of having to build its own libproj from source.

2 Likes