You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10下Octave 9.1.0无法安装/更新包及help命令报错求助

Octave 9.1.0(Windows 10)路径错误问题解决办法

问题背景

系统:Windows 10
Octave版本:9.1.0
包存储路径:C:\Users\me\Documents\OctavePackages

遇到的具体问题:

  • 执行pkg install control-4.0.1.tar.gz时触发路径错误,无法解压安装包:
>> pkg install control-4.0.1.tar.gz
The system cannot find the path specified.
error: unpack: unarchiving program exited with status: 1
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
  • 执行pkg update时出现相同错误,但已安装的包可正常加载
  • 把包文件移至Octave默认路径文件夹、以管理员身份运行Octave均无法解决问题
  • 调用help命令(如help sum)时也出现路径错误:
help sum
The system cannot find the path specified.
The system cannot find the path specified.
warning: help: Texinfo formatting filter exited abnormally; raw Texinfo source of help text follows
'sum' is a built-in function... (etc)

解决办法

  • 配置系统环境变量PATH:
    Octave依赖系统中的tar解压工具和texinfo文档格式化工具,Windows 10默认可能未将Octave自带的这些工具加入环境变量。

    1. 找到Octave安装目录下的mingw64\bin文件夹,默认路径为C:\Program Files\GNU Octave\Octave-9.1.0\mingw64\bin
    2. 右键「此电脑」→「属性」→「高级系统设置」→「环境变量」,在系统变量的PATH中添加上述路径
    3. 重启Octave后测试pkg install或help命令
  • 手动指定工具路径:
    若环境变量配置无效,可在Octave终端中直接设置工具路径:

    % 设置tar工具路径
    setenv("TAR", "C:\Program Files\GNU Octave\Octave-9.1.0\mingw64\bin\tar.exe")
    % 设置texinfo工具路径
    setenv("MAKEINFO", "C:\Program Files\GNU Octave\Octave-9.1.0\mingw64\bin\makeinfo.exe")
    

    执行system("tar --version")和system("makeinfo --version"),若能输出版本信息则说明配置成功

  • 重新安装Octave:
    全新安装时可能遗漏了依赖组件,卸载现有Octave后,重新运行安装程序:

    • 选择默认安装路径(避免自定义路径的权限问题)
    • 勾选所有可选组件(尤其是工具链、文档相关组件)
  • 检查文件夹权限:
    确认C:\Users\me\Documents\OctavePackages文件夹的读写权限:
    右键文件夹→「属性」→「安全」→「编辑」,确保当前用户拥有「完全控制」权限

内容的提问来源于stack exchange,提问作者OSwift

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 12:27:35