Matlab 不再在 Ubuntu 中运行(由于安装了 openjdk?)

Matlab 不再在 Ubuntu 中运行(由于安装了 openjdk?)

我正在使用 Ubuntu 16.04,在周末安装了一些软件包之后,Matlab 2016a 无法再运行并在启动时崩溃。重要的是,我安装了 openjdk-8-jre(因为其他软件依赖于它 - 例如也安装了一些 Python 模块),我怀疑这会给 Matlab 带来问题(在上周末之前运行时没有问题)。重新安装 Matlab 并没有解决问题。从我迄今为止的互联网搜索来看,Matlab 似乎对 Java 环境非常具体。不幸的是,我对 Java 以及我的操作系统上使用的版本不太了解,因此到目前为止无法解决问题。在安装 openjdk-8-jre 时,我是否更改了 Ubuntu 中的某些设置,以至于 Matlab 现在无法再找到它所需的 Java 环境?我怎样才能让 Matlab 再次运行?谢谢!

这是 Matlab 在崩溃时创建的日志:

------------------------------------------------------------------------
       Segmentation violation detected at Mon Nov 28 11:38:26 2016
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled
  Crash Mode          : continue (default)
  Current Graphics Driver: Unknown hardware 
  Current Visual      : 0x20 (class 4, depth 24)
  Default Encoding    : UTF-8
  GNU C Library       : 2.23 stable
  Host Name           : notebook-nb
  MATLAB Architecture : glnxa64
  MATLAB Root         : /opt/matlab/R2016a
  MATLAB Version      : 9.0.0.341360 (R2016a)
  OpenGL              : hardware
  Operating System    : Linux 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64
  Processor ID        : x86 Family 6 Model 60 Stepping 3, GenuineIntel
  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System       : The X.Org Foundation (11804000), display :0

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 0000000000000000  RBX = 00007f6dc833a0e8
  RCX = 00007f6de022eb20  RDX = 0000000000000006
  RSP = 00007f6e693a6ce0  RBP = 00007f6e693a6e00
  RSI = 0000000000000000  RDI = 00007f6dc83108a8

   R8 = 0000000000000030   R9 = 0000000000000004
  R10 = 00007f6dc8690ef0  R11 = 00007f6dc830d000
  R12 = 00007f6df444cd80  R13 = 0000006900000006
  R14 = 0000000000000006  R15 = 00007f6dc8311280

  RIP = 00007f6e84c2856c  EFL = 0000000000010206

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f6e84c2856c                        /lib64/ld-linux-x86-64.so.2+00050540
[  1] 0x00007f6e84c31681                        /lib64/ld-linux-x86-64.so.2+00087681
[  2] 0x00007f6e84c2c394                        /lib64/ld-linux-x86-64.so.2+00066452
[  3] 0x00007f6e84c30bd9                        /lib64/ld-linux-x86-64.so.2+00084953
[  4] 0x00007f6e82399f09                   /lib/x86_64-linux-gnu/libdl.so.2+00003849
[  5] 0x00007f6e84c2c394                        /lib64/ld-linux-x86-64.so.2+00066452
[  6] 0x00007f6e8239a571                   /lib/x86_64-linux-gnu/libdl.so.2+00005489
[  7] 0x00007f6e82399fa1                   /lib/x86_64-linux-gnu/libdl.so.2+00004001 dlopen+00000049
[  8] 0x00007f6e7ebe50b6            /opt/matlab/R2016a/bin/glnxa64/libut.so+00315574
[  9] 0x00007f6e7ebe5c76            /opt/matlab/R2016a/bin/glnxa64/libut.so+00318582 _Z11utGetModuleRKSbIDsSt11char_traitsIDsESaIDsEEPi+00000022
[ 10] 0x00007f6e7ebe5d6b            /opt/matlab/R2016a/bin/glnxa64/libut.so+00318827 utGetModule+00000171
[ 11] 0x00007f6e7370bd45 /opt/matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00482629
[ 12] 0x00007f6e736feeaf /opt/matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00429743 _ZN13Mlm_MATLAB_fn8try_loadEv+00000031
[ 13] 0x00007f6e736f5e95 /opt/matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00392853 _ZN13Mlm_MATLAB_fn4loadEv+00000037
[ 14] 0x00007f6e736f35e9 /opt/matlab/R2016a/bin/glnxa64/libmwm_dispatcher.so+00382441 _ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2_+00000057
[ 15] 0x00007f6e707381c9       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+09232841
[ 16] 0x00007f6e70864dbf       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10464703
[ 17] 0x00007f6e7085aa5a       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10422874
[ 18] 0x00007f6e70823911       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+10197265
[ 19] 0x00007f6e702f1b2a       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04750122
[ 20] 0x00007f6e702f2a4c       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04753996
[ 21] 0x00007f6e702f0ebc       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04746940
[ 22] 0x00007f6e702ee9ea       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04737514
[ 23] 0x00007f6e702eedb1       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04738481
[ 24] 0x00007f6e702f0a63       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04745827
[ 25] 0x00007f6e702f0be9       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+04746217
[ 26] 0x00007f6e703a116f       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+05468527
[ 27] 0x00007f6e703a422a       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+05481002
[ 28] 0x00007f6e70646543       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08242499
[ 29] 0x00007f6e7060f07e       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08015998
[ 30] 0x00007f6e70613058       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08032344
[ 31] 0x00007f6e70613107       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08032519
[ 32] 0x00007f6e7068932c       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08516396
[ 33] 0x00007f6e7068970c       /opt/matlab/R2016a/bin/glnxa64/libmwm_lxe.so+08517388
[ 34] 0x00007f6e7310cd7d /opt/matlab/R2016a/bin/glnxa64/libmwm_interpreter.so+03165565 _Z51inEvalCmdWithLocalReturnInDesiredWSAndPublishEventsRKSbIDsSt11char_traitsIDsESaIDsEEPibbP15inWorkSpace_tag+00000077
[ 35] 0x00007f6e73d859e1         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00825825 _ZNK3iqm18InternalEvalPlugin24inEvalCmdWithLocalReturnERKSbIDsSt11char_traitsIDsESaIDsEEP15inWorkSpace_tag+00000081
[ 36] 0x00007f6e73d85b58         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00826200 _ZN3iqm18InternalEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000120
[ 37] 0x00007f6e5160dee4     /opt/matlab/R2016a/bin/glnxa64/libnativejmi.so+00974564 _ZN9nativejmi21JmiInternalEvalPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000340
[ 38] 0x00007f6e51633edd     /opt/matlab/R2016a/bin/glnxa64/libnativejmi.so+01130205 _ZN3mcr3mvm27McrSwappingIqmPluginAdapterIN9nativejmi21JmiInternalEvalPluginEE7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000429
[ 39] 0x00007f6e73d78f98         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00774040
[ 40] 0x00007f6e73d62c87         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00683143
[ 41] 0x00007f6e72bda7a9      /opt/matlab/R2016a/bin/glnxa64/libmwbridge.so+00173993
[ 42] 0x00007f6e72bdac44      /opt/matlab/R2016a/bin/glnxa64/libmwbridge.so+00175172
[ 43] 0x00007f6e72be11a5      /opt/matlab/R2016a/bin/glnxa64/libmwbridge.so+00201125
[ 44] 0x00007f6e72be12ac      /opt/matlab/R2016a/bin/glnxa64/libmwbridge.so+00201388
[ 45] 0x00007f6e72be197b      /opt/matlab/R2016a/bin/glnxa64/libmwbridge.so+00203131 _Z8mnParserv+00000715
[ 46] 0x00007f6e73a35c13         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00695315
[ 47] 0x00007f6e845be81c         /opt/matlab/R2016a/bin/glnxa64/libmwmvm.so+02410524 _ZNK5boost9function0IvEclEv+00000028
[ 48] 0x00007f6e73a37925         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00702757
[ 49] 0x00007f6e73a38839         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00706617 _ZN5boost6detail17task_shared_stateINS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEvE6do_runEv+00000025
[ 50] 0x00007f6e7f15f8a0          /opt/matlab/R2016a/bin/glnxa64/libmwms.so+03168416 _ZN5boost6detail22task_base_shared_stateIvE3runEv+00000064
[ 51] 0x00007f6e73a39717         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00710423
[ 52] 0x00007f6e73a3575a         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00694106
[ 53] 0x00007f6e73da8c06         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00969734
[ 54] 0x00007f6e73d96b4c         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00895820 _ZN5boost6detail8function21function_obj_invoker0ISt8functionIFNS_3anyEvEES4_E6invokeERNS1_15function_bufferE+00000028
[ 55] 0x00007f6e73d9721f         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00897567 _ZNK5boost9function0INS_3anyEEclEv+00000031
[ 56] 0x00007f6e73d96993         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00895379 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tagRN5boost10shared_ptrIN14cmddistributor17IIPCompletedEventEEE+00000163
[ 57] 0x00007f6e73a4a71d         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00780061
[ 58] 0x00007f6e73d78f98         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00774040
[ 59] 0x00007f6e73d635af         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00685487
[ 60] 0x00007f6e73d607e3         /opt/matlab/R2016a/bin/glnxa64/libmwiqm.so+00673763
[ 61] 0x00007f6e83f7ba3a    /opt/matlab/R2016a/bin/glnxa64/libmwservices.so+03443258
[ 62] 0x00007f6e83f7a8a7    /opt/matlab/R2016a/bin/glnxa64/libmwservices.so+03438759
[ 63] 0x00007f6e83f7b10c    /opt/matlab/R2016a/bin/glnxa64/libmwservices.so+03440908 _Z25svWS_ProcessPendingEventsiib+00000092
[ 64] 0x00007f6e73a35ed2         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00696018
[ 65] 0x00007f6e73a36211         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00696849
[ 66] 0x00007f6e73a22cfd         /opt/matlab/R2016a/bin/glnxa64/libmwmcr.so+00617725
[ 67] 0x00007f6e82b6f70a              /lib/x86_64-linux-gnu/libpthread.so.0+00030474
[ 68] 0x00007f6e828a582d                    /lib/x86_64-linux-gnu/libc.so.6+01075245 clone+00000109
[ 69] 0x0000000000000000                                   <unknown-module>+00000000

答案1

显然,这是一个Matlab 中的错误

该页面建议以下解决方法:

  1. 找到 MATLAB 的安装位置(可能/usr/local/MATLAB/R2016a
  2. 导航到此sys/os/glnxa64文件夹内的目录
  3. 将 libstdc++.so.6 库重命名为 libstdc++.so.6.old

这会强制 MATLAB 加载libstdc++.soUbuntu 中可用的较新版本的库(目前似乎是版本 21)。请注意,上述帖子说他们只尝试了版本 20,因此这可能不起作用。

相关内容