Wo ist meine Software in Linux installiert?

36616
Yin Zhu

Ich benutze whereis matlabund finde /usr/local/bin/matlab :, was eine sehr lange Bash-Datei ist.

Wie kann ich herausfinden, wo Matlab installiert ist?

BEARBEITEN:

Ich habe die folgende Methode verwendet: Öffnen Sie matlab und verwenden Sie edit svds.m, um die Datei svds.m zu öffnen. Der Editor zeigt den Ordner an :)

8
Was ist deine Linux-Distribution? Ist Matlab als RPM-Paket oder aus Source / Tarball installiert? Dmitry Yudakov vor 13 Jahren 1

6 Antworten auf die Frage

12
rescdsk

Try

locate MATLAB 

The binary file is spelled with all-caps. In my system, the MATLAB executable is installed in /usr/local/matlab/r2009b/bin/glnxa64/MATLAB (which is a slightly weird place). The matlab root would then be /usr/local/matlab/r2009b

Of course, normally you do run matlab using the long shell script...

Hinweis: Möglicherweise müssen Sie "sudo updatedb" einmal ausführen, bevor Sie "locate" ausführen (es ist möglich, dass es ansonsten nicht so viel findet). ChristopheD vor 13 Jahren 1
2
yuk

I did

cat `which matlab` | grep matlab 

with output

exec /usr/local/bin/matlab64 -r maxNumCompThreads=4 $* echo " qsub -I -V -l nodes=1,matlab=1" exec /usr/local/bin/matlab64 $* exec /usr/local/bin/matlab32 $* 

Then

$ ls -ld /usr/local/bin/matlab64 lrwxrwxrwx 1 root root 30 May 4 12:08 /usr/local/bin/matlab64 -> /usr/local/matlab64/bin/matlab $ ls -ld /usr/local/bin/matlab32 lrwxrwxrwx 1 root root 28 May 4 12:08 /usr/local/bin/matlab32 -> /usr/local/matlab/bin/matlab $ ls -ld /usr/local/matlab64 lrwxrwxrwx 1 root root 27 May 4 12:01 /usr/local/matlab64 -> /usr/local/matlab_2010a-64/ $ ls -ld /usr/local/matlab lrwxrwxrwx 1 root root 23 May 4 12:01 /usr/local/matlab -> /usr/local/matlab_2010a 

EDIT: The better way is to do it from matlab command line with matlabroot.

>> matlabroot ans = /usr/local/matlab_2010a-64 
Nutzlose Verwendung von `cat`:` grep matlab $ (which matlab) ` Dennis Williamson vor 13 Jahren 2
1
Dmitry Yudakov

On RPM based distributions you can use

rpm -ql <package_name> 

It will show you all files from the package

# rpm -ql wget /etc/wgetrc /usr/bin/wget /usr/share/doc/wget-1.10.2 /usr/share/doc/wget-1.10.2/AUTHORS .... 

If you're not sure how the package is called, you may use something like rpm -qa | grep -i matlab to find its name

0
Noufal Ibrahim

Tthe locations would depend (as Dmitry has suggested) on how you installed the packages. Usually, installation from source would dump the binaries and related files in /usr/local. For details on where standard distributions (like Debian and others put files), consult the Filesystem Hierarchy Standard.

0
alpha1

Ihr Paketmanager könnte es Ihnen sagen. YAST in opensuse verfügt über eine Datei-Registerkarte, auf der alle Dateien und der Speicherort angezeigt werden, in den sie installiert werden. Ich kann nicht für andere Distros sprechen.

0
antiquity

In einer Linux-Umgebung können Sie den folgenden Code ausführen, um MATLAB-Pfade abzurufen

matlab -e | sed -n 's/MATLAB=//p' 

wo matlab -ewerden viele Informationen ausgegeben, um MATLAB auszuführen. Wir müssen sie also weiterleiten, sed -n 's/MATLAB=//p'um nur die MATLAB-Wurzel auszuwählen. Ich verwende dies in meinem Makefile-Dokument, um den Pfad zum mexCompiler zu finden, ohne MATLAB zu starten. Es ist ein sehr schneller Befehl. Zur Vereinfachung habe ich in meinem Makefile-Dokument Folgendes verwendet:

MATLAB = $(shell matlab -e | sed -n 's/MATLAB=//p') MEX = $(MATLAB)/bin/mex