【问题标题】:Note: could not open file /home/.ncviewrc for reading Error: Can't open display:注意:无法打开文件 /home/.ncviewrc 进行读取错误:无法打开显示:
【发布时间】:2022-10-13 18:37:08
【问题描述】:

我正在使用 macOS Monterey (12.4)。

我使用ssh -X username@asasd.de 登录。

已经加载到系统中的模块。 模块列表:

  1. intel-oneapi-compilers/2022.0.1-gcc-11.2.0
  2. openmpi/4.1.2-intel-2021.5.0
  3. netcdf-c/4.8.1-openmpi-4.1.2-intel-2021.5.0
  4. netcdf-fortran/4.5.3-openmpi-4.1.2-intel-2021.5.0
  5. intel-oneapi-mkl/2022.0.1-gcc-11.2.0
  6. ncview/2.1.8-gcc-11.2.0
  7. hdf5/1.12.1-threadsafe-intel-2021.5.0

    在 /work/ 目录中运行模型后,我在那里生成一个文件“file.cdf”。

    我想用ncview打开它。 所以我做了: $ ncview file.cdf 我收到了这个错误。

    Ncview 2.1.8 David W. Pierce  8 March 2017
    http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
    Copyright (C) 1993 through 2015, David W. Pierce
    Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
    This is free software licensed under the Gnu General Public License version 3; type `ncview -c' for redistribution details.
    
    
    Note: could not open file /home/.ncviewrc for reading
    Error: Can't open display:
    

【问题讨论】:

  • 您的 Mac 上是否运行了 X Window 系统?没有它,ssh-X 将毫无用处,您将无法运行ncview,这是一个X11 应用程序。缺少的.ncviewrc 只是一个注释;缺少的 DISPLAY 变量(由于缺少 X11)是您的问题。

标签: macos tcsh x11-forwarding


【解决方案1】:

我是win10用户。使用 ubuntu 20.04 版本。通过“sudo apt install ncview”命令加载 ncview 包。 2.1.8+ds-3build2 版本似乎已加载但面临相同的错误:

Ncview 2.1.8 David W. Pierce 2017 年 3 月 8 日 http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html 版权所有 (C) 1993 至 2015,David W. Pierce Ncview 绝对不提供任何保证;有关详细信息,请键入 ncview -w'. This is free software licensed under the Gnu General Public License version 3; type ncview -c' 以获取重新分发详细信息。

注意:无法打开文件 /home/cahit/.ncviewrc 进行阅读 错误:无法打开显示:

对这种情况有什么建议吗?

【讨论】:

  • 这不是一个答案。问一些问题并实际回答一些其他问题。几次之后,您将能够在问题上制作cmet。
【解决方案2】:

我也面临同样的错误。有解决方案的朋友吗??

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-19
    • 1970-01-01
    • 2021-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多