netcdf-c: Make install cannot write to plugin directory

Using main

When running make install, I get the following:

CMake Error at plugins/cmake_install.cmake:54 (file):
  file INSTALL cannot make directory "/usr/local/hdf5/lib/plugin": No such
  file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:94 (include)

This is using an HDF5 that I build and install in a non /usr/local/hdf5 area. However, in my HDF5 installs, I do not install any plugins, so I don’t change the plugin directory from the default (Not sure why HDF5 build does not put the plugin directory path in my install path…)

Now, when I use that HDF5 library, netCDF tries to install its plugins into that same directory, but I don’t have write access to that directory and it doesn’t even exist…

The fix on my side is to probably specify the hdf5 plugin directory during the build of HDF5, but there is also an issue on netCDF side that if the plugin directory is not writeable by the person running the build, there will be a failure… Not sure of the correct fix, just reporting an issue…

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

IF you define the same HDF5_PLUGIN_PATH at both build time and run-time, then the install will install into the directory specified by HDF5_PLUGIN_PATH and everything works ok, even without sudo (assuming that the installer has write access to the HDF5_PLUGIN_PATH).