0

I am using Linux with a version CentOS Linux release 7.9.2009 (Core) in Termius. I was trying to install hydroPSO, but always encountered an error shown below:

proj.cpp: In function ‘Rcpp::NumericMatrix CPL_proj_direct(Rcpp::CharacterVector, 
Rcpp::NumericMatrix, bool, bool, bool)’:
proj.cpp:281:14: error: ‘proj_normalize_for_visualization’ was not declared in this scope
PJ *NewP = proj_normalize_for_visualization(PJ_DEFAULT_CTX, P);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error message enter image description here

The hydroPSO requires a successful installation of the dependency package sf and I think this error came from sf. I loaded the module proj with version 6.0.0.

enter image description here

This error keeps repeating no matter what I tried. May I ask how to solve this in my Linux environment?

Phoebe
  • 53
  • 5

1 Answers1

0

Just to answer my question, I figured out the solution. The version of proj needs to be 4.9.3 when the gdal is in version 2.4.1. I changed the version of proj to be 4.9.3, and the packages sf and hydroPSO were installed.

Phoebe
  • 53
  • 5
  • 1
    I don't know how Termius works, but if you can choose a distro to work with, working with R you'll have a much easier time with one like Ubuntu or Fedora where there are precompiled binaries for R packages available. – shs Feb 19 '23 at 14:13