【问题标题】:How do you install Octave packages on Mac OS El Capitan?如何在 Mac OS El Capitan 上安装 Octave 软件包?
【发布时间】:2017-02-02 03:11:32
【问题描述】:

我尝试在 Macbook Air 上的 Octave 上安装软件包(来自 Octave Forge 的软件包 io)。具体使用以下命令pkg install -forge io。但是好像不行,打印出如下错误

/usr/local/octave/3.8.0/bin/mkoctfile-3.8.0: line 512:  1600 Segmentation 

fault: 11  /usr/local/octave/3.8.0/bin/g++-mp-4.7 -c -fPIC -I/usr/local/octave/3.8.0/include/octave-3.8.0/octave/.. -I/usr/local/octave/3.8.0/include/octave-3.8.0/octave -I/usr/local/octave/3.8.0/include -pipe-Os -m64 -D_THREAD_SAFE -pthread csvexplode.cc -o csvexplode.o
make: *** [csvexplode.oct] Error 139
/usr/local/octave/3.8.0/bin/mkoctfile-3.8.0 csvexplode.cc

pkg: error running `make' for the io 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

我已尝试以下说明:

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

但它刚刚停止,并在sudo port install octave-general 打印以下内容:

Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Computing dependencies for octave-general
--->  Dependencies to be installed: octave qscintilla qt4-mac dbus libmng texinfo texlive-basic texlive-bin harfbuzz-icu icu libzzip poppler openjpeg15 poppler-data potrace texlive-common xorg-libXaw xorg-libXmu xorg-libXi xorg-inputproto xorg-libXfixes xorg-fixesproto xorg-libXp xorg-printproto texlive-fonts-recommended texlive-latex transfig netpbm libnetpbm
--->  Activating dbus @1.10.8_0
Error: org.macports.activate for port dbus returned: Image error: /Library/LaunchAgents/org.freedesktop.dbus-session.plist already exists and does not belong to a registered port.  Unable to activate port dbus. Use 'port -f activate dbus' to force the activation.
Error: Failed to install dbus
Please see the log file for port dbus for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/main.log
Error: The following dependencies were not installed: octave qscintilla qt4-mac dbus libmng texinfo texlive-basic texlive-bin harfbuzz-icu icu libzzip poppler openjpeg15 poppler-data potrace texlive-common xorg-libXaw xorg-libXmu xorg-libXi xorg-inputproto xorg-libXfixes xorg-fixesproto xorg-libXp xorg-printproto texlive-fonts-recommended texlive-latex transfig netpbm libnetpbm
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port octave-general failed

我想知道如何在 MacOS 上安装 Octave 包?

【问题讨论】:

  • 我不是 MacOSX 用户,但有几点提示:Octave 3.8.0 已过时,您应该尝试 4.0.x 构建。有关 macport、homebrew 和 fink 的说明,请参阅wiki.octave.org/Octave_for_MacOS_X。还有一个针对初学者的dmg。我在您的问题中看不到您使用的是哪个 MacOSX 版本
  • 抱歉,实际使用的是 El Capitan

标签: macos installation octave packages macports


【解决方案1】:

不要把事情弄得太复杂!

但是,八度音程有很多依赖项(100+)!

注意:我首先通过“常规 GUI 应用程序安装”安装 XCode。

您可以尝试使用 MacPorts,有一个相当简单的安装页面,其中包含 https://www.macports.org/install.php 和 https://wiki.octave.org/Octave_for_macOS。

您需要先安装 MacPorts!然后你就可以运行了……

$ sudo port selfupdate
$ sudo port install octave

然后测试它是否工作类型

$ octave

为我工作!

【讨论】:

    【解决方案2】:

    首先,你所有的版本都是旧的,它对我来说是最新的:MacOS 10.13 + Xcode 9.2 + clang-4.0 (4.0.1 from Anaconda) + Octave 4.0.3。

    • 对于 Octave 4.0.3,我使用了他们的 MacOS bundle,而不是 MacPorts。它超级快,它包括 GUI,而且你提到的 gcc48 没有任何延迟。

      • pkg install -forge io 为我工作(直接从 Octave-Forge 获取包)

      • 至于 MacPorts 方法,我无话可说,我从不需要使用它(我使用 brew 代替,但不是用于 octave),它看起来更痛苦且更容易出错。我希望使用 Octave 自己的 Octave-Forge 进行软件包安装应该比端口更干净,查看来自 sudo port install octave-* 的输出。 Warning: xcodebuild exists but failed to execute Warning: Xcode does not appear to be installed 似乎安装了错误的 xcode 版本。因此,如果您真的希望继续调试,请查看 SO 或 Apple 上的许多 xcode 解决方案。 (您可能只有 Xcode 的命令行工具,而不是完整的 Xcode 安装)

      • 我得到的是我的compiler tools (clang/clang++) from Anaconda,而不是 gcc/g++

      • 但老实说,请更新到所有内容的最新版本(如上),然后仅使用 Octave MacOS 捆绑包和 Octave-Forge 而不是 MacPorts 重试,它应该可以工作。

      • 一般来说,我被告知在 2015 年左右人们从 MacPorts 切换到 brew,据说 brew 不那么脆弱且更易于使用。同样,Anaconda 编译器工具比 gcc/g++ 工作得更好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-25
      • 1970-01-01
      • 1970-01-01
      • 2016-08-21
      • 2015-12-30
      • 2016-03-24
      • 1970-01-01
      相关资源
      最近更新 更多