linux 中普通用户安装R:configure: error: --with-x=yes (default) and X11 headers/libs are not available

 

001、问题:configure: error: --with-x=yes (default) and X11 headers/libs are not available

 

 

 

002、解决方法

a、切换为root用户

[liujiaxin01@PC1 R-4.2.1]$ su - root
Password:
Last login: Fri Jan 13 21:48:34 CST 2023 on pts/1

 

 

b、执行如下命令

[root@PC1 ~]# yum install libX11-devel libXt-devel

 

 

c、切换会普通用户,执行如下命令,--with-x=yes 报错消失

[liujiaxin01@PC1 R-4.2.1]$ pwd
/home/liujiaxin01/download_r/R-4.2.1
[liujiaxin01@PC1 R-4.2.1]$ ls
ChangeLog   config.site  configure.ac  doc  INSTALL  Makeconf.in  Makefile.in  Makefrag.cc_lo  Makefrag.m  README  src           tests  VERSION
config.log  configure    COPYING       etc  m4       Makefile.fw  Makefrag.cc  Makefrag.cxx    po          share   SVN-REVISION  tools  VERSION-NICK
[liujiaxin01@PC1 R-4.2.1]$ ./configure --prefix=/home/liujiaxin01/r_test

 

posted @ 2023-01-12 22:05  小鲨鱼2018  阅读(1483)  评论(0编辑  收藏  举报