How To Install Hdf5 Ubuntu
Recently, I want to transfer the NetCDF lawmaking written in windows to use nether linux. I establish that in that location is still a big deviation between the use of NetCDF under linux and nether windows, and at that place are many things that need to exist configured. Since I have not been in contact with NetCDF before, many materials and cognition are read bit by bit from the official website. The same code parses the same file under Windows, but information technology does non recognize the file under Linux. Finally, I saw the official website and found out that the NC file has several data set formats. This commodity mainly explains HDF4/HDF5's back up for NetCDF.
One, environs ubuntu14.four
2. HDF5 support for NetCDF
1. Files to be downloaded
netcdf4.5, HDF5 1.8.nine, zlib 1.2.5, curl 7.eighteen.0 version cannot be lower than the version of these files, the file version I use is netcdf4.5, hdf -ane.10, zlib1.2.11, whorl-7.57.
netcdf download address:https://www.unidata.ucar.edu/downloads/netcdf/index.jsp
HDF5 download accost:https://www.hdfgroup.org/downloads/
zlib download address:http://www.zlib.internet/
gyre download address:https://curl.haxx.se/download.html
The screenshot of the file format is as follows:
When downloading, you demand to download the source code.
2. Use tar -zxvf + file to decompress all files.
3, Enter the decompression directory of zlib, compile and install zlib, enter the following command: $ZDIR=/usr/local/ $sudo ./configure --prefix=${ZDIR} $sudo make check //make check detects whether the surround meets the requirements of the installation. If at that place are errors in the detection, pay attention to encounter if it is necessary for you. Some errors do not need to be handled, the same below. $sudo make install iv, Go to the decompression directory of curl, compile and install curl, and enter the following control: $CURLDIR=/usr/local/ $ sudo ./configure --prefix=${CURLDIR} $sudo make bank check $sudo make install 5, Enter the decompression directory of HDF5, compile and install HDF5, enter the following command: $H5DIR=/usr/local/ $ sudo ./configure --width-zlib=${ZDIR} --prefix=${H5DIR} //The --eanble-hl is added after the official website hither, just I compiled it, just remove it, no issue is institute $sudo make bank check $sudo brand install half-dozen, Enter the decompression directory of NetCDF, compile and install NetCDF, enter the post-obit command: $NCDIR=/usr/local/ $ sudo CPPFLAGS=-I${H5DIR}/include LDFLAGS=-L${H5DIR}/lib ./configure --prefix=${NCDIR} $sudo brand check $sudo make install This step may appear undefined reference to `curl_easy_init'Error, solution: add LIBS+=-lcurl in makefile At this betoken, NetCDF is installed, and HDF5 is also supported. 3. HDF4 supports NetCDF
i. Files that demand to be downloaded: HDF-4.2, libjpeg-6b. As of this article, the downloads are the latest official ones.
hdf4 download address:https://back up.hdfgroup.org/products/hdf4/
libjpeg-6b download link:http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html
File format screenshot:
When downloading, you lot demand to download the source lawmaking.
2. Employ tar -zxvf + file to decompress all files.
3, Enter the NetCDF file directory, compile and install HDF4. $sudo ./configure --enable-shared --disable-netcdf --disable-fortran --prefix=${H4DIR} $sudo make check $sudo make install 4, Compile and install HDF4 support for NetCDF4, the command is as follows: $sudo CPPFLAGS= "-I${H5DIR}/include -I${H4DIR}/include" LDFLAGS= "-L${H5DIR}/lib -L${H4DIR}/lib" ./configure --enable-hdf4 --enable-hdf4 -file -tests --disable-fortran $sudo make check $sudo make install In this step, the installation may non exist then smooth, and there volition be many bug. The problems and solutions are summarized as follows: 1"An error occurred: "cannot compile a elementary Fortran program" can be ignored during installation. The above instructions take been ignored, and the reddish function is added. two"An mistake occurred: cannot find yacc utility install sudo apt-get install byacc。 iii"An fault occurred: cannot discover lex utility install sudo apt-get install flex。 4", an error occurred: couldn't detect jpeg library The library libjpeg-6b is missing. The downloaded 1 is used in this place. For the installation method, enter the libjpeg decompression directory and execute the following command. The problem of 5" may announced. See v" for solutions: xxx/jpeg-6b$ sudo ./configure --prefix=/usr/local --enable-static --enable-shared && brand xxx/jpeg-6b$ sudo make install 5》、make: ./libtool: Control not found Install sudo apt-get install libtool Copy the post-obit file to the libjpeg decompression directory, pay attending to the dot afterwards the instruction below (the dot refers to the current directory, that is, the directory where libjpeg is located ): cp /usr/share/libtool/config/config.sub . cp /usr/share/libtool/config/config.guess . xxx/jpeg-6b$ make make clean 30/jpeg-6b$ sudo ./configure --prefix=/usr/local --enable-static --enable-shared && make xxx/jpeg-6b$ sudo brand install At this stride, the problem of 6" may also occur. See 6" for the solution. 6》、./ncgen: fault while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory Solution: http://blog.csdn.cyberspace/dumeifang/commodity/details/2963223 || http://blog.csdn.net/david_xtd/article/details/7625626/ My instructions are as follows: /etc/ld.so.conf.d$ sudo six libjpeg.conf /etc/ld.so.conf.d$ sudo chmod u+rwx libjpeg.conf Add to the file: /usr/local/lib and save Run /etc/ld.then.conf.d$ sudo ldconfig refresh 5. When yous meet the post-obit information, it ways that HDF4 supports NetCDF4 successfully, screenshot:
Annotation: The above are the bug and solutions I encountered. Peradventure everyone's problems are different. There is always a way to solve them with patience.
The file resources download address used in the article:。
Source: https://programmersought.com/article/34565557036/
Posted by: haileysiond1936.blogspot.com

0 Response to "How To Install Hdf5 Ubuntu"
Post a Comment