I am using ubuntu 20.04 and Matlab 2021a. I can use Dynare with GNU Octave. But when I install dynare-matlab I get the following error:
Setting up dynare-matlab (4.6.0+dfsg-2) …
Building Matlab extensions (logfile at /tmp/dynare-matlab-mexbuild-1622725465.xIjeoTm)
configure: error: MATLAB cannot be found
dpkg: error processing package dynare-matlab (–configure):
installed dynare-matlab package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dynare-matlab
E: Sub-process /usr/bin/dpkg returned an error code (1)
If I run dynare within Matlab, I get the following error:
Warning: Name is nonexistent or not a directory: /usr/lib/dynare/matlab/…/mex/matlab
In path (line 109)
In addpath (line 86)
In dynare_config (line 160)
In dynare (line 74)
And also:
Unrecognized function or variable ‘num_procs’.
Error in default_option_values (line 72)
options_.threads.kronecker.sparse_hessian_times_B_kronecker_C = num_procs;
Error in global_initialization (line 122)
options_ = default_option_values(M_);
Error in myFile.driver (line 24)
global_initialization;
Error in dynare (line 301)
evalin(‘base’,[fname ‘.driver’]) ;
Thank you. I followed the instructions and it seems to work. However, when I do make check I got that the “Ramsey_Example_estimation.mod” does not work. Is this normal or does it imply that I will not be able to use the Ramsey optimal policy commands?
================================
DYNARE MAKE CHECK MATLAB RESULTS
Hi, I have the same problem, but do not understand the proposed solution. In particular, how can I specify the --with-matlab flag? From what I understood from the config.log file, it seems that it is indeed mispecifed:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by dynare configure 4.6.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-matlab=/usr/local/MATLAB/R2021a MATLAB_VERSION=
update-alternatives --display matlab
matlab - auto mode
link best version is /usr/local/MATLAB/R2021a/bin/matlab
link currently points to /usr/local/MATLAB/R2021a/bin/matlab
link matlab is /usr/bin/matlab
slave matlab-mbuild is /usr/bin/matlab-mbuild
slave matlab-mex is /usr/bin/matlab-mex
/usr/local/MATLAB/R2021a/bin/matlab - priority 0
slave matlab-mbuild: /usr/local/MATLAB/R2021a/bin/mbuild
slave matlab-mex: /usr/local/MATLAB/R2021a/bin/mex