# MATLAB question



## Giorgos (Feb 28, 2010)

I am trying to install MATLAB on freebsd 8.0-p2 amd64 and i get the following:

```
# /compat/linux/bin/sh install* -t
expr: illegal option -- r
usage: expr [-e] expression
install: line 197: [: -ne: unary operator expected
install: line 704: /lib/libc.so.6: cannot execute binary file

'xterm': unknown terminal type.
                         Welcome to the MATLAB Installer

...
...
----------------------------------------------------------------------------
                >>>>>>>> For this License Agreement <<<<<<<<
Enter either:  <return>       a        r        p      ^C
To:          [next screen] [accept] [reject] [print] [abort]
----------------------------------------------------------------------------
> a
...
...
------------------------------INSTALLATION-----------------------------
-----------------------------Base Products-----------------------------

-
...
...
Installing Simulink 3D Animation for Linux (x86) ...
Installing SimElectronics for All ...
Installing Robust Control Toolbox for All ...
Installing Filter Design HDL Coder for All ...
Installing Simulink Control Design for All ...
Installing Aerospace Toolbox for All ...
Installing Financial Toolbox for All ...
Installing SimEvents for Linux (x86) ...
Installing Real-Time Workshop Embedded Coder for All ...
Installing Communications Blockset for Linux (x86) ...
Installing Genetic Algorithm and Direct Search Toolbox for All ...
Installing Optimization Toolbox for All ...
Installing Simulink Design Verifier for Linux (x86) ...
Installing Simulink Design Verifier for All ...
Installing SimDriveline for Linux (x86) ...
Installing Fuzzy Logic Toolbox for All ...
Installing Curve Fitting Toolbox for All ...
Installing SimBiology for Linux (x86) ...
Installing Spline Toolbox for All ...
Installing Financial Derivatives Toolbox for All ...
Installing Econometrics Toolbox for All ...
Installing Simulink Verification and Validation for Linux (x86) ...
Installing Partial Differential Equation Toolbox for All ...
Installing MATLAB Builder JA for Linux (x86) ...
Installing MATLAB Builder JA for All ...
Installing Simulink Fixed Point for All ...
Installing Fixed-Income Toolbox for All ...
Installing Aerospace Blockset for Linux (x86) ...
Installing Control System Toolbox for Linux (x86) ...
Installing Database Toolbox for All ...
Installing Datafeed Toolbox for All ...
Installing SimHydraulics for Linux (x86) ...
Installing Bioinformatics Toolbox for Linux (x86) ...
Installing System Identification Toolbox for Linux (x86) ...
Installing Filter Design Toolbox for Linux (x86) ...
Installing SimElectronics for Linux (x86) ...
Installing Mapping Toolbox for Linux (x86) ...
Installing EDA Simulator Link MQ for Linux (x86) ...
Installing EDA Simulator Link IN for Linux (x86) ...
Installing EDA Simulator Link DS for Linux (x86) ...
Installing Communications Toolbox for Linux (x86) ...
Installing Robust Control Toolbox for Linux (x86) ...
Installing Stateflow Coder for All ...
Installing Instrument Control Toolbox for Linux (x86) ...
Installing SimPowerSystems for Linux (x86) ...
Installing Aerospace Toolbox for Linux (x86) ...
Installing Statistics Toolbox for Linux (x86) ...
Installing Fuzzy Logic Toolbox for Linux (x86) ...
Installing SystemTest for Linux (x86) ...
Installing Model Predictive Control Toolbox for Linux (x86) ...
Installing Optimization Toolbox for Linux (x86) ...
Installing Simulink Report Generator for Linux (x86) ...
Installing RF Blockset for Linux (x86) ...
Installing Simulink Design Optimization for Linux (x86) ...
Installing Real-Time Workshop Embedded Coder for Linux (x86) ...
Installing Econometrics Toolbox for Linux (x86) ...
Installing Simulink HDL Coder for Linux (x86) ...
Installing Curve Fitting Toolbox for Linux (x86) ...
Building & updating product files, please wait...
expr: illegal option -- r
usage: expr [-e] expression
/tmp/2501c: line 165: [: -ne: unary operator expected
Installation 100% complete.


The MATLAB installer is finished.  This installation needs to be
activated prior to use.  The activation application will
be launched now.
expr: illegal option -- r
usage: expr [-e] expression
/compat/linux/usr/local/matlab/bin/activate_matlab.sh: line 365: [: -ne: unary operator expected
# Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x504f4767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0x504f4831]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0x5042cf54]
#3 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503e08ce]
#4 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503bd067]
#5 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503bd318]
#6 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x503bd61f]
#7 [0x283223aa]
#8 [0x2831af0d]
#9 [0x2831af0d]
#10 [0x28318249]
#11 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x637338d]
#12 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x64fd168]
#13 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x6373220]
#14 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x363) [0x63c90d3]
#15 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0x282ec96d]
#16 [0x283223aa]
#17 [0x2831ada7]
#18 [0x28318249]
#19 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x637338d]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0x504f4767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0x504f490e]
#2 /usr/lib/libX11.so.6 [0x5042c0e9]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x50422216]
#4 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503bc319]
#5 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503bc565]
#6 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so [0x503bd3c9]
#7 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0x503bd61f]
#8 [0x283223aa]
#9 [0x2831af0d]
#10 [0x2831af0d]
#11 [0x28318249]
#12 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x637338d]
#13 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x64fd168]
#14 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so [0x6373220]
#15 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x363) [0x63c90d3]
#16 /usr/compat/linux/usr/local/matlab/sys/java/jre/glnx86/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0x282ec96d]
#17 [0x283223aa]
#18 [0x2831ada7]
#19 [0x28318249]
```
Any idea what is going on?


----------



## DutchDaemon (Feb 28, 2010)

Are you following http://www.freebsd.org/doc/en/books/handbook/linuxemu-matlab.html or http://forums.freebsd.org/showthread.php?t=10076 ?


----------

