# MatlabSTAN installation on Cent OS 7

**URL:** https://discourse.mc-stan.org/t/matlabstan-installation-on-cent-os-7/2867
**Category:** Interfaces
**Tags:** installation
**Created:** [December 28, 2017, 11:07pm UTC](https://discourse.mc-stan.org/t/matlabstan-installation-on-cent-os-7/2867 "2017-12-28T23:07:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ehsan\_Ahmady](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ehsan_ahmady/32/4361_2.png) [@Ehsan\_Ahmady](https://discourse.mc-stan.org/u/Ehsan_Ahmady)
#### Post date: [December 28, 2017, 11:07pm UTC](https://discourse.mc-stan.org/t/matlabstan-installation-on-cent-os-7/2867/1 "2017-12-28T23:07:15Z")

</div>

Operating System: Cent OS 7  
Interface Version: MatlabStan-2.15.1.0  
Compiler/Toolkit: Matlab 2015a

Hello,

I am trying to install the MatlabStan on a **Matlab 2015a** on the **Cent OS 7**.  
I already have it working on my local system which is a Linux Mint.  
I tried to compile a stan code and here is what I get in the following, the error lines are too many I just copied the first part of it.

The boost version on the system is **boost 1.53** and the gcc is **gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)**

Error using StanModel/compile (line 906)  
compile: In file included from :0:0:  
compile: /home/…/final\_ver2\_4.hpp: In function ‘typename boost::math::tools::promote\_args\<T0\_\_, T1\_\_, T2\_\_, T3\_\_, typename  
boost::math::tools::promote\_args\<T4\_\_, T5\_\_, T6\_\_, T7\_\_\>::type\>::type final\_ver2\_4\_model\_namespace::ehsan\_lpdf(const T0\_\_&, const Eigen::Matrix\<T\_prior\_sample\_size, -1, 1\>&,  
const Eigen::Matrix\<T\_V, -1, 1\>&, const Eigen::Matrix\<RhsScalar, -1, 1\>&, const Eigen::Matrix\<T\_m0, -1, 1\>&, const T5\_\_&, const T6\_\_&, const T7\_\_&, const int&, std::ostream\*)’:  
compile: /home/…/final\_ver2\_4.hpp:106:64: error: too few arguments to function ‘void stan::lang::rethrow\_located(const  
std::exception&, int, const stan::io::program\_reader&)’  
compile: stan::lang::rethrow\_located(e,current\_statement\_begin\_\_);  
compile: ^  
compile: In file included from stan/src/stan/model/model\_header.hpp:12:0,  
compile: from /home/…/project/final\_ver2\_4.hpp:3,  
compile: from :0:  
compile: stan/src/stan/lang/rethrow\_located.hpp:89:17: note: declared here  
compile: inline void rethrow\_located(const std::exception& e, int line,  
compile: ^

---

<div class="post-metadata">

### Author: ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)
#### Post date: [December 28, 2017, 11:23pm UTC](https://discourse.mc-stan.org/t/matlabstan-installation-on-cent-os-7/2867/2 "2017-12-28T23:23:56Z")

</div>

You may have a C++ file for your model that was generated with a previous version of Stan. If so, try deleting that. Or it could be that your CmdStan is out of sync with its Stan subrepositories.
