Install error for dynare-matlab in Kubuntu 14.04

I am trying to install dynare-matlab in Kubuntu 14.04 (Matlab R2013a). I added the dynare repositories (following … anOrUbuntu). The ‘dynare’ package installs just fine using apt-get. The ‘dynare-matlab’ package fails to install and give the following error. Any one have an idea what the problem is?

Setting up dynare-matlab (4.4.1-1build1) ... Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1398269501.BReprML) 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 Errors were encountered while processing: dynare-matlab E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried apt-get --purge remove on both dynare and dynare-matlab, followed by install again but this didn’t help. The first time I ran the install it asked me for the location of matlab and what logins/accounts were allowed to use it, it no longer asks me this, how can I get it to ask me this again (purge didn’t help with this)?

I don’t know if the dynare-matlab package works regularly or not, but your compilation error says that you’re missing libmatio. Try installing that (and ensure your paths are correct) then try installing dynare-matlab again

I have been looking in the repositories and there is no libmatio in the (k)ubuntu 14.04 repositories. Only libmatio2, which is installed.

libmatio was in 13.10, but now with 14.04 it has been dropped from the repositories and only libmatio2 is available.

Could this be an issue with the dynare-matlab package not working for 14.04? Namely, that the dynare-matlab package needs to be updated to work with libmatio2 instead of libmatio?

Any suggestions on how to fix this short of compiling from the binary which is beyond my linux skill level?

libmatio does not appear to be in 14.04 (trusty)
but libmatio2 is

You should install the libmatio-dev package.

This is a missing dependency of dynare-matlab. It was fixed in Debian but not yet in Ubuntu.

Finally had some spare time and got dynare working with Matlab in Kubuntu 14.04. Since it took a couple of extra steps I will detail them here. Hopefully save someone else some time.

First was to install libmatio-dev package as Sébastian suggested. With this done the installation of the dynare-matlab package could be completed.

Next Matlab objected that it did not recognize the ‘dynare’ command. To fix this I added ‘/usr/share/dynare/’ and all of its subfolders to the default Matlab paths. (details, see footnote 1)

Finally, Matlab gave the error
/usr/lib/dynare/matlab/dynare_m: /home/username/matlab/sys/os/glnxa64/ version `GLIBCXX_3.4.15’ not found (required by /usr/lib/dynare/matlab/dynare_m)
the solution to this was to simply ‘get rid’ of matlab’s forced reference to This was done by the following two lines in the command line:
cd ~/matlab/sys/os/glnxa64/
sudo mv
(these two lines just rename the to, this effectively deletes, but keeps a backup at in case you ever need it)

With this everything works and I was finally able to run
dynare RBC.mod
and have it work.

One remaining issue. Whenever I run a dynare code I get a lot of warnings like
"Warning: Function /usr/share/dynare/matlab/missing/bsxfun/bsxfun.m has the same name as a MATLAB builtin. We suggest you rename
the function to avoid a potential name conflict. "
is there any way to suppress these short of just renaming all of them? (can I just delete the path to /usr/share/dynare/matlab/missing/, or are this actually often needed?)

Footnote 1: Click ‘Set Paths’ on the Home tab of the ribbon across the top of Matlab, this opens a window listing all paths, click ‘Add with Subfolders’, type ‘/usr/share/dynare’, then just save and close.

Thanks for posting the last fix! It also applied to Ubuntu 12.04 + dynare 4.4.3 and Matlab R2013a. The matlab directory was, naturally, in my case different.