本文将着重介绍在Ubuntu 10.10下安装最新版Gnome-Shell安装方法:
1,安装依赖和下载设置脚本
sudo apt-get install curl jhbuild libjasper-dev libdconf0 libtiff4-dev libgstreamer0.10-dev
libcroco3-dev xserver-xephyr xulrunner-dev python-dev mesa-utils mesa-common-dev libreadline5-dev
libgl1-mesa-dev libwnck-dev librsvg2-dev libgnome-desktop-dev libgnome-menu-dev
libffi-dev libgtk2.0-dev libgconf2-dev libdbus-glib-1-dev gtk-doc-tools gnome-common
git-core flex bison automake build-essential icon-naming-utils autopoint libcanberra-dev
libpulse-dev libvorbis-dev gnome-settings-daemon-dev libxklavier-dev libpam0g-dev libtasn1-3-bin
libupower-glib-dev libgnome-keyring-dev
cd
curl -O http://git.gnome.org/browse/gnome-shell/plain/tools/build/gnome-shell-build-setup.sh
注意:如果你在使用Mozilla Daily PPA,你还得安装xulrunner-1.9.2-dev
sudo apt-get install xulrunner-1.9.2-dev
接下来进行2,3步,如果在2,3步遇到gjs编译的问题,你可以尝试把Mozilla Daily PPA给删除了,然后再重新执行下边的第2步
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntu-mozilla-daily/ppa
2,导出变量
export PATH=$PATH:/home/username/bin
username换成你的用户名
3,开始编译
cd
chmod +x gnome-shell-build-setup.sh
./gnome-shell-build-setup.sh
jhbuild build
然后拿杯咖啡去享受或者继续完成其他工作吧,这个需要等待一段时间,具体长度视网速和机器性能
还有,如果在编译中遇到以下问题:
问题1:
/home/andrei/gnome-shell/install/lib/libgio-2.0.so: undefined reference to `g_main_context_invoke’
collect2: ld returned 1 exit status
[...]
*** Error during phase build of gnome-shell: ########## Error running make *** [24/28]
解决办法:不要关闭当前终端,打开一个新终端,
对于32位
rm ~/gnome-shell/install/lib/*.la
对于64位
rm ~/gnome-shell/install/lib64/*.la
然后回到原终端,重新运行
jhbuild build
可能会出现以下内容:
[1] Rerun phase build
[2] Ignore error and continue to install
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase “wipe directory and start over”
[7] Go to phase “configure”
[8] Go to phase “clean”
[9] Go to phase “distclean”
在这里输入6,然后根据提示输入yes..不出意外,应该安装成功了,会收到如下的提示信息:
*** success *** [28/28]
问题2:
~/gnome-shell/source/gnome-settings-daemon/gnome-settings-daemon/main.c:274: undefined reference to `notify_init’
collect2: ld returned 1 exit status
make[3]: *** [gnome-settings-daemon] Error 1
make[3]: Leaving directory `/home/arindom/gnome-shell/source/gnome-settings-daemon/gnome-settings-daemon’
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/arindom/gnome-shell/source/gnome-settings-daemon/gnome-settings-daemon’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/arindom/gnome-shell/source/gnome-settings-daemon’
make: *** [all] Error 2
*** Error during phase build of gnome-settings-daemon: ########## Error running make *** [26/28]
解决办法:
cd ~/bin
./jhbuild shell
cd ~/gnome-shell/source
git clone git://git.gnome.org/libnotify
cd ./libnotify
./autogen.sh –prefix $HOME/gnome-shell/install/
make && make install
问题3:安装成功,却无法启动
andrei@andrei-desktop:~$ ~/gnome-shell/source/gnome-shell/src/gnome-shell –replace
mutter: symbol lookup error: /home/andrei/gnome-shell/install/lib/gtk-3.0/modules/libcanberra-gtk-module.so:
undefined symbol: gtk_quit_add
解决办法
rm ~/gnome-shell/install/lib/gtk-3.0/modules/libcanberra-gtk-module.so
4,尝试安装好的gnome-shell
打开终端,输入
~/gnome-shell/source/gnome-shell/src/gnome-shell –replace
退出gnome-shell:
ALT+F2,输入
debugexit
5,升级gnome-shell
cd && jhbuild build –force –clean
如果遇到以前问题,解决就是了…如果遇到撞破头皮也搞不定的,兄弟…把$HOME里的gnome-shell都给删除了重新来一次吧。