dpkg:错误处理包 dynare-matlab

dpkg:错误处理包 dynare-matlab

我安装的 Dynare 无法正常工作。我做了以下操作:

  • 手动添加deb http://www.dynare.org/ubuntu trusty main contrib到 sources.list 文件中。
  • sudo apt-get 更新
  • sudo apt-get 安装 dynare-matlab

这是后者的输出(删除了一些无用的输出):

Fetched 62.1 MB in 1min 42s (604 kB/s)                                         
Extract templates from packages: 100%
Preconfiguring packages ...
update-alternatives: using /usr/local/MATLAB/R2015a/bin/matlab to provide /usr/bin/matlab (matlab) in auto mode
update-alternatives: warning: skip creation of /usr/bin/matlab-mbuild because associated file /usr/local/MATLAB/R2015a/bin/mbuild (of link group matlab) doesn't exist
Selecting previously unselected package imagemagick-common.
(Reading database ... 979203 files and directories currently installed.)
Preparing to unpack .../imagemagick-common_8%3a6.7.7.10-6ubuntu3_all.deb ...
...
...
Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1453562394.8blVBrS)
install: cannot stat ‘/usr/src/matlab/dynare-matlab/mex/matlab/*’: No such file or directory
dpkg: error processing package dynare-matlab (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up aglfn (1.7-3) ...
...
Processing triggers for menu (2.1.46ubuntu1) ...
Errors were encountered while processing:
 dynare-matlab
E: Sub-process /usr/bin/dpkg returned an error code (1)

安装时会提示一些问题,要求输入安装文件夹和许可证。这很好。有什么想法吗?

编辑:刚刚意识到当 Matlab 版本的用户名和为 dynare 选择的用户名不同时会出现此问题。我再次重新配置了该位(使用sudo dpkg-reconfigure matlab-support)。然后,再次尝试,但出现以下错误:

Setting up dynare-matlab (4.4.1-1build1) ...
Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1453566407.Ox9duw7)
In file included from ./tensor.hweb:53:0,
                 from ./gs_tensor.hweb:24,
                 from ./t_container.hweb:53,
                 from ./stack_container.hweb:87,
                 from ./faa_di_bruno.hweb:18,
                 from ./faa_di_bruno.cweb:10:
./twod_matrix.hweb:29:20: fatal error: matio.h: No such file or directory
compilation terminated.
make[1]: *** [libdynare___a-faa_di_bruno.o] Error 1
make: *** [all-recursive] Error 1
dpkg: error processing package dynare-matlab (--configure):
 subprocess installed post-installation script returned error exit status 2
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我找到了解决方案这里。这似乎是 Ubuntu 软件包的一个错误。基本上,依赖项不正确,因为缺少库 libmatio。通过先通过 安装该库sudo apt-get install libmatio-dev,然后安装可以解决问题dynare-matlab

然后,dynare 开始工作。

PD:我使用的是 4.4.1 包,而不是 4.4.3 包。然而,根据已知错误,此错误尚未确认。我已提交此错误这里

相关内容