Ubuntu 16.04: fatal error: X11/Xlib.h: No such file or directory

﹥>﹥吖頭↗ 提交于 2019-12-13 00:44:25

问题


I am trying to install Rgtk2 (dependency for rattle). I am using R thru Anaconda. I am getting the following error.

In file included from Rgtk.c:7:0:  
/usr/include/gtk-2.0/gdk/gdkx.h:32:10: fatal error: X11/Xlib.h: No such file or directory  
 #include <X11/Xlib.h>   
          ^~~~~~~~~~~~ 

I tried the following workarounds as found in StackOverflow and other blogs.

  1. Installed libx11-dev, mesa-common-dev, libglu1-mesa-dev, libxrandr-dev, libxi-dev

  2. Tried installing RGtk2_2.20.31 from source.

Every time I am getting the same error.


回答1:


anaconda has its own environment, which by default usually lacks X11 headers(e.g libx11-dev, or whatever you call it). Try "conda install -c conda-forge xorg-libx11" . It worked for me when a certain R-package threw an error "X11/Xlib.h : No such file or directory".



来源:https://stackoverflow.com/questions/47827207/ubuntu-16-04-fatal-error-x11-xlib-h-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!