Errors "Could NOT find JPEG" and "Could NOT find Jasper" Reported When Compiling the wgrib2 Module
Symptom
During the NCEPLIBS compilation and installation, the wgrib2 module reports the two errors: "Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)" and "Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)."

Key Process and Cause Analysis
None
Conclusion and Solution
The JASPER and JPEG installation paths are not added to the used file.
- Modify the CMakeCache.txt file.
- Open the CMakeCache.txt file.
vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/build/wgrib2/src/wgrib2-build/CMakeCache.txt
- Press i to enter the edit mode and add the JASPER and JPEG installation paths.
//Path to a file. JASPER_INCLUDE_DIR:PATH=/path/to/JASPER/include/ //Path to a library. JASPER_LIBRARY_DEBUG:FILEPATH=/path/to/JASPER/lib/ //Path to a library. JASPER_LIBRARY_RELEASE:FILEPATH=/path/to/JASPER/lib/libjasper.so //Path to a file. JPEG_INCLUDE_DIR:PATH=/path/to/JPEG/include //Path to a library. JPEG_LIBRARY_DEBUG:FILEPATH=/path/to/JPEG/lib //Path to a library. JPEG_LIBRARY_RELEASE:FILEPATH=JPEG_LIBRARY_RELEASE-NOTFOUND
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the CMakeCache.txt file.
- Perform the compilation again.
make
Parent topic: Troubleshooting