Octave 安装工具箱出错 Only Win32 target is supported!
我在安装和使用 GNU Octave。
- 平台:MSYS2 on Windows 10
- 版本:
mingw-w64-ucrt-x86_64-octaveversion 8.4.0
遇到了如下的问题。
问题描述
所有的工具包均无法安装。
我最开始通过命令安装:
pkg install -forge optim
出现如下报错:
error: unpack: unarchiving program exited with status: 1
tar: Error opening archive: Failed to open '/C/Users/[我的用户名]/AppData/Local/Temp/optim-1.6.2-BYsFp4.tar.gz'
error: called from
unpack at line 287 column 5
untar at line 48 column 5
install at line 99 column 9
pkg at line 619 column 9
根据网上的提示,我改为从官网上下载并手动安装工具包(这里拿 io 工具包示例。因为我各种工具包一直装不上,以为是工具包之间有相互依赖没装好,所以开始尝试安装 io):
cd /path/to/Downloaded/packages/
pkg install io-2.6.4.tar.gz
产生了一大串 make 编译报错,具体内容因为太长只能截取部分。报错信息中重复出现 `#error Only Win32 target is supported!。但是在我的计算机上 GCC 和 make 等工具均已正确安装。
详细的报错信息如下:
octave:1> pkg install io-2.6.4.tar.gz
In file included from D:\msys64\ucrt64/include/pthread.h:64,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/x86_64-pc-m
sys/bits/gthr-default.h:35,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/x86_64-pc-m
sys/bits/gthr.h:148,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/ext/atomici
ty.h:35,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/bits/shared
_ptr_base.h:61,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/bits/shared
_ptr.h:53,
from /usr/lib/gcc/x86_64-pc-msys/13.2.0/include/c++/memory:80,
from D:\msys64\ucrt64\include\octave-8.4.0\octave\../octave/Arr
ay-fwd.h:38,
from D:\msys64\ucrt64\include\octave-8.4.0\octave\../octave/Arr
ay.h:38,
......
补充信息
尝试过单独安装适用于 Windows 10 的 Octave(而不是集成在 MSYS2 里的版本),产生的报错信息和上述的情形完全相同。没有什么用。