R package install::Error: gdal-config not found or not executable

conda env of r-base and gdal

  • to make r-base environment consistent and stable
  • install r-base=4.0.5 with gdal=3.2.2 in one conda environment
conda create -n r
conda activate r
conda install -c bioconda r-base=4.0.5

update gdal

bioconda::gdal-1.9.2-0 --> conda-forge::gdal-3.2.2

anaconda::hdf5-1.10.1 --> conda-forge::hdf5-1.10.6

  • updated gdal within env of r-base-4.0.5
conda activate r
conda install -c conda-forge gdal=3.2.2

export PATH

  • update .bashrc
  • point to the r env containing r-base, gdal, and hdf5
export PATH="/path/to/conda/envs/r/bin:$PATH"

你可能感兴趣的:(R package install::Error: gdal-config not found or not executable)