# Cannot read GSHHG files with GMT6 on Cygwin

**URL:** <https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819>\
**Category:** Q&A\
**Created:** [August 28, 2020, 9:36am UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819 "2020-08-28T09:36:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![doublon](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@doublon](https://forum.generic-mapping-tools.org/u/doublon)\
**Post date:** [August 28, 2020, 9:36am UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/1 "2020-08-28T09:36:44Z")

</div>

Hello,

I just installed GMT6 on Cygwin.

Everything works fine except accessing GSHHG files.

When I run for example pscoast, I get the foillowing errors:  
gshhg\_version: cannot open file “/home/doublon/gmt/gshhg-gmt-2.3.7/binned\_GSHHS\_f.nc” (-101).  
pscoast [ERROR]: 1. GSHHG: Found /home/doublon/gmt/gshhg-gmt-2.3.7/binned\_GSHHS\_f.nc but cannot read it due to wrong permissions  
pscoast [ERROR]: GSHHG version 2.2.0 or newer is needed to use coastlines with GMT.  
Get and install GSHHG from ftp://ftp.soest.hawaii.edu/gshhg/.  
pscoast [ERROR]: Could not find file [GSHHG full resolution shorelines]  
pscoast [ERROR]: No GSHHG databases available - must abort

However gshhg-gmt-2.3.7 is installed, with full access permissions.

Thanks

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [August 28, 2020, 11:59am UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/2 "2020-08-28T11:59:40Z")

</div>

> [@doublon](#):
>
> I just installed GMT6 on Cygwin.

What do you mean with this? Did you build GMT yourself in Cygwin or used the Windows installer? If later, you should had let it install where proposed (c:\programs\gmt6)

---

<div class="post-metadata">

**Author:** ![doublon](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@doublon](https://forum.generic-mapping-tools.org/u/doublon)\
**Post date:** [August 28, 2020, 12:26pm UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/3 "2020-08-28T12:26:45Z")

</div>

Hello,  
I installed it building GMT myself from the source, following instructions in  
[http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT#Cygwin](http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT#Cygwin).

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [August 28, 2020, 2:46pm UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/4 "2020-08-28T14:46:43Z")

</div>

> [@doublon](#):
>
> gshhg\_version: cannot open file “/home/doublon/gmt/gshhg-gmt-2.3.7/binned\_GSHHS\_f.nc” (-101).

It smells a netCDF error. That message is issued when

```auto
status = nc_open(filename, NC_NOWRITE, &ncid);

```

fails.

Cygwin builds are not tested. Why don’t you just use the Windows binaries.

---

<div class="post-metadata">

**Author:** ![doublon](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@doublon](https://forum.generic-mapping-tools.org/u/doublon)\
**Post date:** [August 28, 2020, 4:20pm UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/5 "2020-08-28T16:20:41Z")

</div>

I was used to install previous versions on Cygwin from sources.  
I do not know how to use Windows binaries; I will try and find out to follow your suggestion.

By the way, recently my GMT5 (not GMT6) had suddenly the same problem with GSHHG, with no apparent reason. This is why I tried to install GMT6.

Thank you.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [August 28, 2020, 4:45pm UTC](https://forum.generic-mapping-tools.org/t/cannot-read-gshhg-files-with-gmt6-on-cygwin/819/6 "2020-08-28T16:45:44Z")

</div>

Looks like some update screwed the netCDF or HDF5 libs
