sunqing3020590的个人博客分享 http://blog.sciencenet.cn/u/sunqing3020590

博文

LEDAPS&LaSRC安装(3)

已有 3461 次阅读 2018-10-24 15:41 |系统分类:科研笔记| ledaps, lasrc, 安装

 


下载:
http://edclpdsftp.cr.usgs.gov/downloads/auxiliaries/lasrc_auxiliary/lasrc_aux.2013-2017.tar.gz

设置环境变量:
export L8_AUX_DIR="directory_saved_auxiliary_files"

安装lasrc:
    cd lasrc\c_version\src
    make
    make install

    cd lasrc\landsat_aux\src
    make
    make install
  
 生成可执行文件在之前设置好的$PREFIX/bin的目录下(PREFIX="/home/chexh/ESPA/")
 
 
 
 安装ledaps:
 设置环境变量:
 export LEDAPS_AUX_DIR="/home/chexh/ESPA/espa-surface-reflectance/ledaps/"
 安装:
    cd ledaps\ledapsSrc\src
    make
    make install
    make clean

    cd ledaps\ledapsAncSrc
    make
    make install
    make clean

出错:

  1. apt-get install 的netcdf库错误,手动安装解决

    ncep_reanalysis_surface_repackage.c:833:14: error: ‘NC_UINT’ undeclared (first use in this function)

             case NC_UINT:

                  ^

        ncep_reanalysis_surface_repackage.c:835:14: error: ‘NC_INT64’ undeclared (first use in this function)

                 case NC_INT64:

                      ^

        ncep_reanalysis_surface_repackage.c:837:14: error: ‘NC_UINT64’ undeclared (first use in this function)

                 case NC_UINT64:

                      ^

        Makefile:90: recipe for target 'ncep_reanalysis_surface_repackage.o' failed

        make: *** [ncep_reanalysis_surface_repackage.o] Error 1


2. 编译源码netcdf4库的时候出错

显示Can't find or link to the hdf5 library

参考:https://tuxcoder.wordpress.com/2015/02/02/install-netcdf4-with-hdf5-in-ubuntu-linux/

解决方法,指定CPPFLAGS和LDFLAGS (一行命令,不要分开):

CPPFLAGS="-I/mnt/d/Ubuntu/lib/szip-master/src/ -I/home/chexh/LIBS/hdf5-1.10.4/include/" LDFLAGS="-L/mnt/d/Ubuntu/lib/szip-master/src/ -L/home/chexh/LIBS/hdf5-1.10.4/lib/" ./configure --prefix=/home/chexh/LIBS/netcdf-4.6.1/ --enable-netcdf-4 --enable-shared


3.编译源码netcdf4库的时候出错

显示错误:

> "/shome/2007asz8296/netcdf-4.1.3/include"
> /usr/bin/install -c -m 644 netcdf.h
> '/shome/2007asz8296/netcdf-4.1.3/include'
> /usr/bin/install: `netcdf.h' and
> `/shome/2007asz8296/netcdf-4.1.3/include/netcdf.h' are the same file
> make[2]: *** [install-includeHEADERS] Error 1
> make[2]: Leaving directory `/shome/2007asz8296/netcdf-4.1.3/include'
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory `/shome/2007asz8296/netcdf-4.1.3/include'
> make: *** [install-recursive] Error 1

解决方法:不要将netcdf的安装源文件的目录作为目标安装目录,须新建一个安装目录。





https://blog.sciencenet.cn/blog-2410131-1142583.html

上一篇:LEDAPS&LaSRC安装(2)espa-product-formatter安装-最折腾-2018
下一篇:惊出一身冷汗!Mac中office word闪退,把即将完成的博士论文文档自动删除,如何恢复?
收藏 IP: 58.213.93.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-8 20:51

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部