![dpkg:错误处理包 dynare-matlab](https://linux22.com/image/879372/dpkg%EF%BC%9A%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86%E5%8C%85%20dynare-matlab.png)
我安装的 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)