[Met_help] [rt.rap.ucar.edu #83872] History for Error when install METv6.1

John Halley Gotway via RT met_help at ucar.edu
Thu Feb 1 08:33:54 MST 2018


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Dear sir or madam,

  I am asking help for install MET v6.1. I am trying to install MET v6.1 on a desktop with ubuntu 16.04.1 64-bit.

  The gcc version is (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609




  I installed netCDF-C 4.6.0  in /usr/local. 




  The environmental variables were set as:

export MET_NETCDFINC=/usr/local/include
export MET_NETCDFLIB=/usr/local/lib

export MET_GSLINC=/usr/local/include
export MET_GSLLIB=/usr/local/lib

export MET_BUFRLIB=/usr/local/lib
 

However, when I compiled MET, it shows a message of error:

In file included from nc_var_info.cc:24:0:
nc_utils.h:22:18: fatal error: netcdf: No such file or directory
compilation terminated.




  I then made a soft link /usr/local/include/netcdf  to /usr/local/include/netcdf.h

  Then it gave errors like this:

 nc_utils.h:23:17: error: ‘netCDF’ is not a namespace-name
 using namespace netCDF;
                 ^
nc_utils.h:23:23: error: expected namespace-name before ‘;’ token
 using namespace netCDF;
                       ^
In file included from nc_var_info.cc:24:0:
nc_utils.h:88:46: error: ‘NcAtt’ does not name a type
 extern bool      get_att_value_chars  (const NcAtt *, ConcatString &);
                                              ^
nc_utils.h:89:46: error: ‘NcAtt’ does not name a type
 extern int       get_att_value_int    (const NcAtt *);






  Please help.




  Great thanks!




Jiangshan Zhu

----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Error when install METv6.1
From: John Halley Gotway
Time: Wed Jan 31 07:12:08 2018

I see that you’re having trouble compiling MET with NetCDF.  This can
be a
bit confusing.

MET requires C++ interface to NetCDF.  It sounds like you’ve compiled
NetCDF-C without NetCDF-C++.

Here’s the page from the online tutorial which talks about this:
https://dtcenter.org/met/users/support/online_tutorial/METv6.1/tutorial.php?name=compilation&category=req_libs

Also, here’s the Dockerfile which is used to compile NetCDF and all of
MET
as a Docker container.  This serves as a concise example:

https://github.com/NCAR/container-dtc-met/blob/met-
6.1_dev/MET/Dockerfile

Hope that helps.

Thanks,
John Halley Gotway
On Wed, Jan 31, 2018 at 1:20 AM zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> Wed Jan 31 01:20:41 2018: Request 83872 was acted upon.
> Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
>        Queue: met_help
>      Subject: Error when install METv6.1
>        Owner: Nobody
>   Requestors: zhujiangshan at mail.iap.ac.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83872 >
>
>
> Dear sir or madam,
>
>   I am asking help for install MET v6.1. I am trying to install MET
v6.1
> on a desktop with ubuntu 16.04.1 64-bit.
>
>   The gcc version is (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
>
>
>
>
>   I installed netCDF-C 4.6.0  in /usr/local.
>
>
>
>
>   The environmental variables were set as:
>
> export MET_NETCDFINC=/usr/local/include
> export MET_NETCDFLIB=/usr/local/lib
>
> export MET_GSLINC=/usr/local/include
> export MET_GSLLIB=/usr/local/lib
>
> export MET_BUFRLIB=/usr/local/lib
>
>
> However, when I compiled MET, it shows a message of error:
>
> In file included from nc_var_info.cc:24:0:
> nc_utils.h:22:18: fatal error: netcdf: No such file or directory
> compilation terminated.
>
>
>
>
>   I then made a soft link /usr/local/include/netcdf  to
> /usr/local/include/netcdf.h
>
>   Then it gave errors like this:
>
>  nc_utils.h:23:17: error: ‘netCDF’ is not a namespace-name
>  using namespace netCDF;
>                  ^
> nc_utils.h:23:23: error: expected namespace-name before ‘;’ token
>  using namespace netCDF;
>                        ^
> In file included from nc_var_info.cc:24:0:
> nc_utils.h:88:46: error: ‘NcAtt’ does not name a type
>  extern bool      get_att_value_chars  (const NcAtt *, ConcatString
&);
>                                               ^
> nc_utils.h:89:46: error: ‘NcAtt’ does not name a type
>  extern int       get_att_value_int    (const NcAtt *);
>
>
>
>
>
>
>   Please help.
>
>
>
>
>   Great thanks!
>
>
>
>
> Jiangshan Zhu
>

------------------------------------------------
Subject: 答复: [rt.rap.ucar.edu #83872] Error when install METv6.1
From: zhujiangshan
Time: Wed Jan 31 23:06:26 2018

John,
  It works. Thank you very much!

Jiangshan Zhu

-----邮件原件-----
发件人: www-data at rap.ucar.edu [mailto:www-data at rap.ucar.edu] 代表 John
Halley Gotway via RT
发送时间: 2018年1月31日 22:12
收件人: zhujiangshan at mail.iap.ac.cn
主题: Re: [rt.rap.ucar.edu #83872] Error when install METv6.1

I see that you’re having trouble compiling MET with NetCDF.  This can
be a bit confusing.

MET requires C++ interface to NetCDF.  It sounds like you’ve compiled
NetCDF-C without NetCDF-C++.

Here’s the page from the online tutorial which talks about this:
https://dtcenter.org/met/users/support/online_tutorial/METv6.1/tutorial.php?name=compilation&category=req_libs

Also, here’s the Dockerfile which is used to compile NetCDF and all of
MET as a Docker container.  This serves as a concise example:

https://github.com/NCAR/container-dtc-met/blob/met-
6.1_dev/MET/Dockerfile

Hope that helps.

Thanks,
John Halley Gotway
On Wed, Jan 31, 2018 at 1:20 AM zhujiangshan via RT
<met_help at ucar.edu>
wrote:

>
> Wed Jan 31 01:20:41 2018: Request 83872 was acted upon.
> Transaction: Ticket created by zhujiangshan at mail.iap.ac.cn
>        Queue: met_help
>      Subject: Error when install METv6.1
>        Owner: Nobody
>   Requestors: zhujiangshan at mail.iap.ac.cn
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=83872
> >
>
>
> Dear sir or madam,
>
>   I am asking help for install MET v6.1. I am trying to install MET
> v6.1 on a desktop with ubuntu 16.04.1 64-bit.
>
>   The gcc version is (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
>
>
>
>
>   I installed netCDF-C 4.6.0  in /usr/local.
>
>
>
>
>   The environmental variables were set as:
>
> export MET_NETCDFINC=/usr/local/include export
> MET_NETCDFLIB=/usr/local/lib
>
> export MET_GSLINC=/usr/local/include
> export MET_GSLLIB=/usr/local/lib
>
> export MET_BUFRLIB=/usr/local/lib
>
>
> However, when I compiled MET, it shows a message of error:
>
> In file included from nc_var_info.cc:24:0:
> nc_utils.h:22:18: fatal error: netcdf: No such file or directory
> compilation terminated.
>
>
>
>
>   I then made a soft link /usr/local/include/netcdf  to
> /usr/local/include/netcdf.h
>
>   Then it gave errors like this:
>
>  nc_utils.h:23:17: error: ‘netCDF’ is not a namespace-name  using
> namespace netCDF;
>                  ^
> nc_utils.h:23:23: error: expected namespace-name before ‘;’ token
> using namespace netCDF;
>                        ^
> In file included from nc_var_info.cc:24:0:
> nc_utils.h:88:46: error: ‘NcAtt’ does not name a type
>  extern bool      get_att_value_chars  (const NcAtt *, ConcatString
&);
>                                               ^
> nc_utils.h:89:46: error: ‘NcAtt’ does not name a type
>  extern int       get_att_value_int    (const NcAtt *);
>
>
>
>
>
>
>   Please help.
>
>
>
>
>   Great thanks!
>
>
>
>
> Jiangshan Zhu
>



------------------------------------------------


More information about the Met_help mailing list