Jupyter R内核崩溃了

时间:2015-10-19 10:42:23

标签: r linux ipython-notebook anaconda jupyter

我刚从Anaconda安装了R essentials(已在我的计算机上安装了R),以便在Jupyter中使用R.

现在,当我在Jupyter中打开一个新的R笔记本时,几秒钟后(甚至没有输入任何内容),内核崩溃并需要重新启动。

我在终端上遇到的错误是

[I 12:30:36.297 NotebookApp] Kernel started: dd5dd612-2c8f-4235-9619-1cf5a46b3e89
  

IRkernel :: main()的   dyn.load中的错误(文件,DLLpath = DLLpath,...):     无法加载共享对象'/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so':     /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6:找不到版本CXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted [I 12:30:39.299 NotebookApp] KernelRestarter: restarting kernel (1/5) IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: version CXXABI_1.3.8'(由/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so)   来电::: ... tryCatch - &gt; tryCatchList - &gt; tryCatchOne - &gt;   执行停止   [I 12:30:42.309 NotebookApp] KernelRestarter:重启内核(2/5)   IRkernel ::主()   dyn.load中的错误(文件,DLLpath = DLLpath,...):     无法加载共享对象'/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so':     /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6:找不到版本CXXABI_1.3.8' not found (required by /home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so) Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted [I 12:30:45.315 NotebookApp] KernelRestarter: restarting kernel (3/5) IRkernel::main() Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so': /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6: version CXXABI_1.3.8'(由/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so)   来电::: ... tryCatch - &gt; tryCatchList - &gt; tryCatchOne - &gt;   执行停止   [12:30:46.485 NotebookApp]等待来自dd5dd612-2c8f-4235-9619-1cf5a46b3e89的kernel_info回复的超时   [I 12:30:48.322 NotebookApp] KernelRestarter:重启内核(4/5)   警告:root:kernel dd5dd612-2c8f-4235-9619-1cf5a46b3e89重新启动   IRkernel ::主()   dyn.load中的错误(文件,DLLpath = DLLpath,...):     无法加载共享对象'/home/alberto/R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so':     /home/alberto/anaconda3/lib/R/library/rzmq/libs/../../../../libstdc++.so.6:找不到版本`CXXABI_1.3.8'(/ home / alberto要求) /R/x86_64-pc-linux-gnu-library/3.2/stringi/libs/stringi.so)   来电::: ... tryCatch - &gt; tryCatchList - &gt; tryCatchOne - &gt;   执行停止   [W 12:30:51.329 NotebookApp] KernelRestarter:重启失败   [W 12:30:51.329 NotebookApp]内核dd5dd612-2c8f-4235-9619-1cf5a46b3e89死亡,从地图中删除。   错误:root:内核dd5dd612-2c8f-4235-9619-1cf5a46b3e89重启失败!   [W 12:30:51.361 NotebookApp]在会话之前删除了内核

我想这可能是共享库的问题,但我无法弄清楚如何解决它......

2 个答案:

答案 0 :(得分:3)

(仅限TEMP FIX)

请参阅此讨论:https://groups.google.com/a/continuum.io/forum/#!topic/conda/nqPfPGYP--g

我能够使用建议的临时修复程序运行内核:

$ conda remove gcc libgcc

答案 1 :(得分:0)

我遇到了同样的问题。问题似乎是Jupyter中的R内核正在查看具有较旧版本的ibstdc ++的其他位置.so.6。

以下步骤适用于我(以root身份登录,因为R和python以root身份安装):

cp -fv /usr/local/lib64/libstdc++* /lib64/
cd /lib64
ln -sfT libstdc++.so.6.0.21 libstdc++.so.6

说明:

[root@SERVER ~]# strings /usr/local/lib64/libstdc++.so.6 | grep CXXABI_1.3
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_1.3
CXXABI_1.3.2
CXXABI_1.3.6
CXXABI_1.3.9
CXXABI_1.3.1
CXXABI_1.3.5
CXXABI_1.3.8
CXXABI_1.3.4
CXXABI_1.3.7
CXXABI_1.3.3
[root@SERVER ~]# strings /lib64/libstdc++.so.6 | grep CXXABI_1.3
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7

我们可以看到/lib64/libstdc++.so.6指向比/ usr / local / lib64 / libstdc ++更旧的版本.so.6

[root@SERVER ~]# ls /lib64/libstdc++.so.* -lrt
-rwxr-xr-x 1 root root   830776 Mar  5  2015 /lib64/libstdc++.so.5.0.7
lrwxrwxrwx 1 root root       18 Apr 29  2016 /lib64/libstdc++.so.5 -> libstdc++.so.5.0.7
lrwxrwxrwx 1 root root       19 Jan 27 01:46 /lib64/libstdc++.so.6 -> libstdc++.so.6.0.19
-rwxr-xr-x 1 root root 11103508 Feb  3 21:41 /lib64/libstdc++.so.6.0.19
-rwxr-xr-x 1 root root 11103508 Feb  3 21:41 /lib64/libstdc++.so.6.0.21
-rw-r--r-- 1 root root     2397 Feb  3 21:41 /lib64/libstdc++.so.6.0.21-gdb.py
[root@SERVER ~]# ls /usr/local/lib64/libstdc++* -lrt
-rwxr-xr-x 1 root root      905 Jun 15  2016 /usr/local/lib64/libstdc++fs.la
-rw-r--r-- 1 root root 10964026 Jun 15  2016 /usr/local/lib64/libstdc++fs.a
-rwxr-xr-x 1 root root 11103508 Jun 15  2016 /usr/local/lib64/libstdc++.so.6.0.21
lrwxrwxrwx 1 root root       19 Jun 15  2016 /usr/local/lib64/libstdc++.so.6 -> libstdc++.so.6.0.21
lrwxrwxrwx 1 root root       19 Jun 15  2016 /usr/local/lib64/libstdc++.so -> libstdc++.so.6.0.21
-rwxr-xr-x 1 root root      965 Jun 15  2016 /usr/local/lib64/libstdc++.la
-rw-r--r-- 1 root root 28847974 Jun 15  2016 /usr/local/lib64/libstdc++.a

因此,我将所有libstd ++文件从/ usr / local / lib64复制到/ lib64,然后将软链接更改为指向新版本。