【问题标题】:Installing general package in octave has error在 octave 中安装通用包有错误
【发布时间】:2019-11-28 14:32:51
【问题描述】:

使用说明安装通用包时出错。

pkg install -forge general

并得到消息

octave:3> pkg install -forge general
In file included from /usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include/stdint.h:3:0,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/oct-conf-post.h:167,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/config.h:3351,
                 from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/../octave/oct.h:31,
                 from SHA1.cc:19:
/usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
make: *** [SHA1.oct] Error 1
/usr/local/octave/3.8.0/bin/mkoctfile-3.8.0 SHA1.cc

pkg: error running `make' for the general package.
error: called from 'configure_make' in file /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/configure_make.m near line 82, column 9
error: called from:
error:   /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m at line 199, column 5
error:   /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/pkg.m at line 394, column 9
octave:3> 

我不知道如何解决这个问题。我的电脑操作系统是 Mac 10.9.3 Mavericks。八度版本是 3.8.0

octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
no packages installed.

有人知道吗?

【问题讨论】:

    标签: octave


    【解决方案1】:

    我找到了解决办法!使用此评论

    xcode-select --install
    

    成功了!

    octave:1> ver
    ----------------------------------------------------------------------
    GNU Octave Version 3.8.0
    GNU Octave License: GNU General Public License
    Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
    ----------------------------------------------------------------------
    no packages installed.
    octave:2> pkg install -forge general
    For information about changes from previous versions of the general package, run 'news general'.
    octave:3> ver
    ----------------------------------------------------------------------
    GNU Octave Version 3.8.0
    GNU Octave License: GNU General Public License
    Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
    ----------------------------------------------------------------------
    Package Name  | Version | Installation directory
    --------------+---------+-----------------------
         general  |   1.3.4 | /Users/apple/octave/general-1.3.4
    

    【讨论】:

    • 我遇到了同样的问题,你的回答很完美。运行 xcode-select 在我的 Mac 上安装了命令行工具。这似乎与other post 中的解决方案相同。谢谢!
    【解决方案2】:

    我在尝试安装 Octave Signal Package 时遇到了同样的问题,但没有成功。以下终于似乎起作用了。

    1. code-select --install 从终端窗口安装命令行工具
    2. 为 Mac 安装 MacPorts。这是一个标准安装程序,您可以从 Macports 下载。
    3. sudo port install gcc48 --> 这是一个Fortran编译器,是安装octave-general所必需的
    4. sudo port install octave-general [注意:这花了 非常 很长时间,我不得不禁用 Spotlight 索引...在 Macbook Pro 上运行时间]
    5. sudo 端口安装八度控制
    6. sudo 端口安装八度信号

    【讨论】:

      【解决方案3】:

      在查看如何安装 control 包时,我在 Arch Wiki 中找到了这个:

      注意:某些 Octave 的包,如 control,需要 gcc-fortran ArchLinux 的包才能编译和安装。 (https://wiki.archlinux.org/index.php/Octave)

      所以你可能必须先安装gcc-fortran

      【讨论】:

        猜你喜欢
        • 2017-01-02
        • 2012-12-25
        • 1970-01-01
        • 2015-01-25
        • 2014-09-30
        • 1970-01-01
        • 1970-01-01
        • 2015-12-06
        • 1970-01-01
        相关资源
        最近更新 更多