Windows10下Octave便携版安装包报错求助
Windows10下Octave 8.4.0便携版安装包报错问题
环境信息
- 操作系统:Windows10
- Octave版本:8.4.0便携版(zip压缩包)
核心问题
安装本地包、GitHub远程包或使用pkg install -forge命令均失败,报错集中在tar解压环节。
详细报错与排查过程
1. 初始本地包安装报错
执行pkg install arduino-0.12.1.tar.gz后报错:
>> pkg install arduino-0.12.1.tar.gz error: unpack: unarchiving program exited with status: 2 tar: /C/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now 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
2. 调试解压命令
在unpack.m中添加调试信息,获取到Octave执行的解压命令:
>> pkg install arduino-0.12.1.tar.gz Current path: C:\Users\Legion\AppData\Local\Temp\oct-VvVNU6 Command is: tar xf "/C/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz" 2>&1 error: unpack: unarchiving program exited with status: 2 tar: /C/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error: called from unpack at line 290 column 5 untar at line 48 column 5 install at line 99 column 9 pkg at line 619 column 9
3. 修改路径格式后的新报错
手动将命令中的/C/改为C:/,出现新错误:
>> pkg install arduino-0.12.1.tar.gz Current path: C:\Users\Legion\AppData\Local\Temp\oct-fCIzKT Command is: tar xf "C:/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz" 2>&1 error: unpack: unarchiving program exited with status: 128 tar: Cannot connect to C: resolve failed error: called from unpack at line 290 column 5 untar at line 48 column 5 install at line 99 column 9 pkg at line 619 column 9
注:将该命令复制到cmd中可成功执行,原因是cmd使用系统自带tar,而非Octave内置的Cygwin tar。
4. 修改临时目录无效
尝试修改Octave临时目录后,问题未解决:
>> setenv('tmpdir','C:\octave\temp') >> pkg install arduino-0.12.1.tar.gz Current path: C:\octave\temp\oct-rF0VdY Command is: tar xf "/C/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz" 2>&1 error: unpack: unarchiving program exited with status: 2 tar: /C/PortableApps/PortableApps/octave-8.4.0-w64/arduino-0.12.1.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error: called from unpack at line 290 column 5 untar at line 48 column 5 install at line 99 column 9 pkg at line 619 column 9
5. 远程GitHub包安装同样报错
直接从GitHub地址安装,仍出现相同解压错误:
>> setenv('tmpdir','C:\octave\temp') >> pkg install "https://github.com/gnu-octave/octave-arduino/releases/download/release-0.12.1/arduino-0.12.1.tar.gz" Current path: C:\octave\temp\oct-OnnVD1 Command is: tar xf "/C/octave/temp/oct-CxgHf3/arduino-0.12.1.tar.gz" 2>&1 error: unpack: unarchiving program exited with status: 2 tar: /C/octave/temp/oct-CxgHf3/arduino-0.12.1.tar.gz: Cannot open: No such file or directory tar: Error is not recoverable: exiting now error: called from unpack at line 290 column 5 untar at line 48 column 5 install at line 99 column 9 pkg at line 619 column 9
求助需求
已查阅同类问题但均不适用,求可行的解决思路。
内容的提问来源于stack exchange,提问作者Arthur Precht
相关产品推荐
相关产品推荐

