经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Windows » 查看文章
cygwin下安装NCL
来源:cnblogs  作者:zhanggl_12138  时间:2018/10/31 9:00:45  对本文有异议
 
1.安装cygwin
到cygwin官网https://www.cygwin.com/下载安装程序,setup-x86.exe,注意能下载这个安装程序, setup-x86_64.exe64位不支持ncl安装
 
2.双击运行 setup-x86.exe,从镜像网站中下载安装包至本地,不要在线安装,选择文件下载至local,并且手动点击,实现所有的程序包的下载。在选择镜像网站的时候,可以选择后缀为.jp的,也就是日本服务器,速度较快,全部下载之后大概有17G,可能需要一天时间下载
 
3.安装cygwin,双击 setup-x86.exe开始安装程序,选择从本地文件安装程序,在软件安装的时候,需要特别安装以下插件,以保证后续的ncl安装成功
  • Category "Devel": install "autoconf", "binutils", "bison", "byacc", "flex", "gcc", "gcc4", "gcc4-fortran", "gcc-g++", "gdb", "make", "makedepend", "openssl-devel".

     

  • Category "Editors": [optional] some popular editors that you might want for editing your files include "nedit", "emacs", and "vim".

     

  • Category "Graphics": [optional] install "ghostscript" for viewing PostScript files, "ImageMagick" for "convert"

     

  • Category "Libs": "expat", "libcurl4", "libexpat-devel", "libgfortran4", "libidn-devel", "libxml2", "libtirpc", "zlib"

     

  • Category "Net": `install "libcurl-devel", "libcurl4", and "openssh".

     

  • Category "Shells": install "bash", "sh-utils", "pdsh", and "tcsh".

     

  • Category "X11": install all of the required packages that the "Installing Cygwin/X" section mentions (see #15 where it lists all the "X11" packages and whether they are required or optional).
 
5.安装ncl
mkdir /usr/local
cd /usr/local
gunzip /cygwin/home/JohnDoe/ncl_ncarg-6.5.0.CYGWIN_NT-10.0-WOW_i686.tar.gz
tar -xvf /cygwin/home/JohnDoe/ncl_ncarg-6.5.0.CYGWIN_NT-10.0-WOW_i686.tar
 
6.设置环境变量,生效环境变量,大功告成!
Every user of NCL needs to set their environment before they can use NCL. You can do this by opening your "c:\cygwin\home\xxx\.bashrc" (or "c:\cygwin\home\xxx\.bash_profile" if ".bashrc" doesn't exist) file with a UNIX editor and adding the lines:
export NCARG_ROOT=/usr/local
export PATH=/usr/local/bin:$PATH
 
csh/tcsh:
source ~/.cshrc
source ~/.tcshrc
bash/ksh:
. ~/.bashrc
. ~/.bash_profile
 
7.中间可能出现的问题
a.在cygwin中安装ncl之后,运行ncl毫无反应,没有报错也没有进入ncl
可能原因:很有可能是安装64位的cygwin,导致没有结果
Important note: Cygwin comes with two versions of the setup program. They are called setup-x86.exe and setup-x86_64.exe. Download the setup-x86.exe one, because the other one is for 64-bit Cygwin. NCL can't be installed under 64-bit Cygwin because there are many external packages that NCL depends on that aren't buildable under 64-bit Cygwin.
 
b.安装ncl之后,运行ncl,报错显示缺少一些.dll文件,例如 error while loading shared libraries: cygmpfr-4.dll:cannot open shared object file: No such file or directory等
原因:安装cygwin的时候选择默认安装插件,没有手动选择自己需要的,导致没有安装
解决方法:先检查cygwin的安装包是否包含上述插件,没有则下载完成安装包,重新安装,在安装的过程中不要需要默认形式,手动install,尤其注意选择步骤3中的几个插件,否则可能出错
 
 
参考网站:
 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号