gfortran:错误:libgfortran.spec:没有这样的文件或目录 [英] gfortran: error: libgfortran.spec: No such file or directory

查看:211
本文介绍了gfortran:错误:libgfortran.spec:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下makefile在macOS上安装并运行gfortran-8.我从

  • 安装下载的 gfortran-8.2-Mojave.dmg ,at会使用此编译器为您的MacOS创建二进制文件.

  • 转到在文件夹中提取的路径.(在Mac中,您不需要Windows二进制文件,而需要使用gfotran编译器进行编译.)

  • 在at文件夹中执行以下命令.

    • 安装后.关闭所有终端.
    • 打开新终端.请执行以下操作:
    • 在您的终端中,键入以下内容:回声$ PATH
    • 如果有的话,上述命令会在zsh文件中为您提供当前路径.
    • 将侍者添加到您的zsh文件中.您可以在终端中使用以下命令:

        cd纳米.zsh 

    • 请注意,当前路径中没有Bellhop,因此我们将通过在.zsh文件中添加以下行,将其复制并粘贴到以下列表中来进行添加(相应地更改路径) export PATH = your_local_macOS_path/at:your_local_macOS_path/at/Bellhop:$ PATH $

    • 对我来说是: export PATH =/用户/jaypatel/下载/at:/用户/jaypatel/下载/at/Bellhop:$ PATH $

    • 有关更多详细信息,请参见下面的屏幕截图.

    • 完成后,请按ctrl + X,它将询问您是否要保存文件,请键入Y,然后按Enter,这样将成功保存路径.

    • 现在使用以下命令将〜/.zsh 源到您的终端:

       源〜/.zsh回声$ PATH 

    • 这意味着您的声学工具箱和bellhop.exe现已在路径中.

    • 现在使用以下命令将〜/.zsh 源到您的终端: source〜/.zsh

    • Voila ,您的 Bellhop 已成功安装.

    参考:

    • 您可以在此处找到更多详细信息.

    I am attempting to install and run gfortran-8 on macOS with the following makefile. I installed it from http://hpc.sourceforge.net/ (8.3 version). I keep getting this error:

    gfortran: error: libgfortran.spec: No such file or directory
    

    I know libhfortran.spec is located in /usr/local/Cellar/gcc@8/8.4.0/lib/gcc/8/libgfortran.spec. I have added it to my etc/paths and my .bash_profile. I have also uninstalled gfortran and reinstalled it. Anyone have a clue on what I might be missing? I am attaching my makefile below.

    Makefile: https://drive.google.com/open?id=1Y_Zo2dSYI32dQpwMtdUy5rWB8avDHXor

    解决方案

    Bellhop Macintosh Installation

    • Note: I know gfortran is now part of gcc but newest at version still only works with older gfotran compilers. If you have Catalina as well, don’t worry this will still work on Mojave as well as on Catalina. I had tested it.

    • Go to this link.

    • Download

    • Install the downloaded gfortran-8.2-Mojave.dmg, this compiler is being used by the at to create binaries for your MacOS.

    • Go to the path where you extracted at folder. (In Mac you don’t need windows binary, you need to compile using gfotran compiler.)

    • Execute the following commands in the at folder.

    • Once you installed. Close all the terminals.
    • Open new terminal. Do as follows:
    • In your terminal, type this: echo $PATH
    • Above command give you current path in your zsh file, If you have one.
    • Add bellhop to your zsh file. You can use these commands in terminal:

      cd
      nano .zsh
      

    • Please note that there is no Bellhop in the path right now, so we are going to add that by adding the following line in the .zsh file, Copy and paste below list (change the path accordingly) export PATH=your_local_macOS_path/at:your_local_macOS_path/at/Bellhop:$PATH$

    • For me, it was: export PATH=/Users/jaypatel/Downloads/at:/Users/jaypatel/Downloads/at/Bellhop:$PATH$

    • Refer the screenshot below for more details.

    • Once you’re done, press ctrl+X and it will ask you do you want to save your file, type Y and press enter and it will save the path successfully.

    • And now source ~/.zsh to your terminal using this command :

      source ~/.zsh
      echo $PATH
      

    • This means your acoustic toolbox and bellhop.exe are in path’s now.

    • And now source ~/.zsh to your terminal using this command : source ~/.zsh

    • And Voila, Your Bellhop is successfully installed.

    Reference :

    • You can find more details here.

    这篇关于gfortran:错误:libgfortran.spec:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆