RHEL 5.1下安装VNC新手教程与常见问题(1)
RHEL 5.1下安装VNC新手教程与常见问题(1)
今天装了下VNC,解决了不少问题,写个教学贴,给新手们看看,如果你们碰到同样的问题,就可以迅速解决,无需头疼甚至放弃了。
系统环境
VM+RHEL5.1 [root@localhost .vnc]# uname -r 2.6.18-53.el5xen
本地XP系统安装VNCVIEW去控制VM中的RHEL5.1
下面在LINUX上安装VNCSERVER
1、去www.realvnc.com去下载免费版for x86 linux
2、下载是一个tar.gz文件,解压后进入文件夹,里面有个README,请注意这块不要下载RPM包,依赖问题以及包头的安全签名会让你很郁闷的。
3、解压缩,进入该文件夹,按照readme 要求执行4步
% ./vncinstall /usr/local/bin % ./vncinstall /usr/local/bin /usr/local/man % mkdir -p /usr/local/vnc/classes % cp java/* /usr/local/vnc/classes
4、启动VNCSERVER,输入连接密码
5、可能会提示linux1x: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
去下载libstdc++-libc6.2-2.so.3,放到/usr/lib里面,这个我碰到了,通过下载这个SO文件解决了)
下面这个方法在这个版本中不可取,我已经试过,是无效的
在我的系统上ls命令的结果是 libstdc++.so.5.0.7 libstdc++.so.6.0.8
libstdc++.so.6.0.8就是我们要找的,给它做个链接
代码:
$ sudo ln -s libstdc++.so.6.0.8 libstdc++-libc6.2-2.so.3
会出现如下错误:
vncpasswd: symbol lookup error:vncpasswd: undefined symbol: __builtin_vec_new
看到这个错感觉就是那两个库不一样造成的字符未定义
6、继续启动vncserver,可能还有错误,如下
vncext: VNC extension running! vncext: Listening for VNC connections on port 5901 vncext: Listening for HTTP connections on port 5801 vncext: created VNC server for screen 0 error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Fatal server error: could not open default font 'fixed' xsetroot: unable to open display 'localhost.localdomain:1' vncconfig: unable to open display "localhost.localdomain:1" Warning: This program is an suid-root program or is being run by the root user. The full text of the error or warning message cannot be safely formatted in this environment. You may get a more descriptive message by running the program as a non-root user or by removing the suid bit on the executable. xterm Xt error: Can't open display: %s
原因:vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但RHEL5却在/usr /share/X11/fonts/下
解决:
mkdir /usr/X11R6/lib cd /usr/X11R6/lib ln -s /usr/share/X11 X11
评论暂时关闭