I am LAZY bones? AN ancient AND boring SITE

分类: '故障分析' 的归档

升级libcairo2出了问题

早上一来,照例升级了一下系统,发现了一堆更新,于是没想啥就都装上了,结果问题就开始了:
点击ff的关于对话框崩溃,打开 thunderbird 直接崩溃, leafpad和mousepad的关于对话框也崩溃,ccsm拖动一下滚动条就崩溃.
在命令行里面看到,错误都是 Floating point exception (core dumped)
把升级的包都翻出来看了一下,怀疑最有可能是 libcairo2 ,这个,于是下载了旧的包,覆盖安装,一起又恢复正常了.
发了个帖,以示后人,貌似也有几个和我一样的,呵呵.具体看这个:
http://forum.ubuntu.org.cn/viewtopic.php?t=93410

咳~又来一次有惊无险

事情是这样的:
为了解决7.10那该死的framebuffer不能用的问题(虽然fb本身也真的没啥用),就先照着这个帖子这样做了,改了/etc/initramfs-tools/modules和/etc/modprobe.d/blacklist-framebuffer文件,但是后来发现还是不见效,问题还是没有解决,就又打开 /etc/modprobe.d/blacklist-framebuffer 看了一眼,发现还有两行: blacklist gx1fb 和 blacklist intelfb (我的显卡是intel的集成显卡),就又顺手把这两行给注释了…结果再启动,到了gdm那步就黑屏了,显示器都没信号,进入休眠模式了,键盘完全没相应,按caps lock灯都不亮了….于是马上用同事的机器,打算ssh上来看看,发现失败了,估计是sshd没起来;又自然想到进 recovery 模式,发现还是这样,都进不了tty;于是又用以前留下的老内核试了试,结果也还是这样,汗了….
无奈之下,只得进那N个月都没进去过的windows先了.进了windows,上官方网站下载了7.10的CD镜像,刻录(因为之前是从7.04升上来的,所以我手头都没有live CD).再用live CD启动,改会 /etc/modprobe.d/blacklist-framebuffer 这个文件,在启动ubuntu,嘿嘿,这回总算乖乖地了…感叹到: linux就是爽,即使搞出再大的飞机,只要有live CD在手,就能live

顺便让大家流一下口水…看我下7.10 ISO的网速…
看我下7.10 ISO的网速

7.10问题不断啊

7.10问题不断啊,今天打开电脑,输入完用户名和密码后就黑屏了,过了一会桌面出来了,还是CF的桌面,但是移动一下窗口就知道,已经变得很慢了,而且CPU占用超高,就像没装显卡3D驱动一样.另外fcitx也呼不出来了,中文都输入不了,不过结束掉fcitx后再重现启动一下,输入法倒是解决了.
于是又满世界找原因,发现一执行glxgears就重启X,应该是3D引擎的问题.看了下apt的log,发现昨天在解决窗口边框问题的时候,曾经把xserver-xgl给装上了,猜想这可能就是原因,于是马上把这个卸了,重启X,果然好了… Laughing
不过这个问题倒是不能怪7.10,都怪自己病急乱投医,明明知道7.10已经不需要xserver-xgl了还是装上试了下,才闹出这样的笑话…

7.10 CF窗口无边框一解

昨天记得还好好的,今天不知道怎么回事,一来公司发现刚升级的7.10所有窗口都没有边框了,肯定是CF出了问题,搜索论坛,发现一堆人说什么要改什么xorg.conf,要装什么显卡驱动,然后正好我昨天动过 xorg.conf,就瞎改了一通,无效,连恢复备份文件也无效.
正郁闷之际,偶然打开了 ccsm(CompizConfig Settings Manager)看了下,发现居然是因为里面的”窗口装饰”没选上…..
选上就OK了,随即@@

这件事也告诉我们,往往有些很简单的事情会被我们想得很复杂.

郁闷的man

7.10还真是有点郁闷,无缘无故,居然man都乱码了,幸好还是找到点蛛丝马迹,把问题解决了….详细过程见 http://forum.ubuntu.org.cn/viewtopic.php?t=83051&highlight=

方法: sudo apt-get install manpages-zh
替换掉原来的 manpages-zh-utf8 ,再 man ls 正常显示中文的帮助.

manpages-dev

看到msgget函数,不知道具体用法,man了一下,居然是“No manual entry for msgget”汗!google了半天也没一个比较像样的介绍。结果上irc上问,说需要按照 manpages-dev 这个包,哈哈。原来如此啊!

引用:
MSGGET(2) Linux Programmer’s Manual MSGGET(2)NAME
msgget – get a message queue identifier

SYNOPSIS
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>

int msgget(key_t key, int msgflg);

DESCRIPTION
The msgget() system call returns the message queue identifier associated with the value of the key argument. A new message queue is
created if key has the value IPC_PRIVATE or key isn’t IPC_PRIVATE, no message queue with the given key key exists, and IPC_CREAT is
specified in msgflg.
……

怪异的locale问题

为了解决那个anjuta的中文乱码问题,试了好多方法,把系统的locale乱改了一通,结果乱码问题没有解决,反而差点把我的系统给弄坏了。
当我决定放弃anjuta的时候,我还原了系统的locale,但是却出现了一个错误提示,如下:

引用:
lily@LLY:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN.UTF-8
LC_CTYPE=”zh_CN.UTF-8″
LC_NUMERIC=”zh_CN.UTF-8″
LC_TIME=”zh_CN.UTF-8″
LC_COLLATE=zh_CN@pinyin.utf8
LC_MONETARY=”zh_CN.UTF-8″
LC_MESSAGES=”zh_CN.UTF-8″
LC_PAPER=”zh_CN.UTF-8″
LC_NAME=”zh_CN.UTF-8″
LC_ADDRESS=”zh_CN.UTF-8″
LC_TELEPHONE=”zh_CN.UTF-8″
LC_MEASUREMENT=”zh_CN.UTF-8″
LC_IDENTIFICATION=”zh_CN.UTF-8″
LC_ALL=

我有一种不祥的预感,试着重新登录了一下,果然,系统的菜单变成英文的了,fcitx输入法呼不出来了,看起来情况非常糟糕。
弄了很久都没有结果后,突然想到前几天装过一个用拼音排序的包,修改了 /etc/environment 文件,加了一行
LC_COLLATE=zh_CN@pinyin.utf8,会不会是这样原因呢?试着把这行删除,再重新登录,居然一切都好了。问题是之前这个包一直都正常啊,于是不甘心,重新安装了这个包,又重新把那行加上,再登录,还是好的,而且拼音排序功能也正常。不解中。。。有点怪异。不过好歹又能用了。 Very Happy

在sata硬盘上装redhat

由于采用sata硬盘的机子较新,而redhat较老.所以在sata的电脑(我用的是intel5130的服务器)上装redhat将成为一件比较麻烦的事情.
幸好intel的主板还是比较强悍的,已经可以支持sata了,但是还是需要在bios设置上做点手脚才行,在advance的ATA设置一项里面,将SATA模式由ENHANCED MODE改为COMPATIBLE MODE,在用redhat的光盘引导机子就可以顺利安装了.

PS:小小得BS下intel技术支持,告诉我的方法都是不可行的,还得我自己研究,咳!

相信在上面装ubuntu应该不用那么费力了,呵呵!要不改天试试?

再次证明安装windows比安装linux要麻烦

前几天在我的“ubuntu根分区迁移历程”一文中曾指出了windows安装比linux难的例子,这个主要是因为windows需要安装在主分区上,而且必须要往硬盘的第一个主分区里面写点数据,如果你不幸吧第一个主分区弄成ext3等格式的话,你可能就得多花点力气了。

而最近我又发现安装windows的另一个麻烦事,经过是这样的:
由于最近我换家公司,到了新的工作环境后第一件要做的事情也许就是重装系统,因为电脑的前主人留下个乱乱的win2000,实在是不能忍受,所以就决定全部重装,这回吸收了教训,打算先装win再装ubuntu,拿了windows的安装盘(向同事借的番茄家园),开机进bios,设置光驱启动。重启以后进入安装选择的选择页面了,但是现在问题出现了,我不管怎么按键盘鼠标,都没有反映,仿佛失灵了一样。随着倒计时的用尽,机器又进了默认的“硬盘启动”,但是奇怪的是进了原来那个win2000系统后,键盘鼠标却又一切正常了!纳闷间,忽然发现,我的键盘和鼠标都是USB接口的,难道和这个有关?google了一下之后,发现果然就是这样原因,解决的办法就是修改bios设置,打开usb键盘鼠标的支持。于是马上重启,进bios找到相应选项,设置正确后,再次重启,进入选择页面后果然可以了,然后就选择“手动安装windows XP SP2”,原以外之后就会一切正常了,但是我却高兴得太早了。一些初始化之后,到了选择安装分区的那步了,发现键盘再次失灵!原因是由于此时键盘已经由windows安装程序驱动,不再受bios的管辖,而windows安装程序又没有强大到支持所有的USB键盘,结果可想而知,只能按重启键了。后来不得已向同事借了个Ps/2接口的键盘,才算搞定!
后来我抱着试试看的态度,再换上我的USB键盘,安装ubuntu 7.04,结果发现居然完全没有问题!!安装过程相当简单!

结论:
1.谁说windows安装容易,上手容易!如果当时我身边没有PS/2的键盘,还真不知道该怎么办了!
2.下次如果买电脑,还是得买PS/2的键盘。

ubuntu升级到7.04以后,vmware不能重新配置的解决办法:

vmware原先是在6.10下安装的,6.10下运行没问题。系统升级后,重新配置,出现如下错误:

代码:
#
lly@lly:~$ sudo vmware-config.pl
#
Making sure services for VMware Workstation are stopped.
#

#
Stopping VMware services:
#
Virtual machine monitor done
#
Bridged networking on /dev/vmnet0 done
#
DHCP server on /dev/vmnet1 done
#
Host-only networking on /dev/vmnet1 done
#
DHCP server on /dev/vmnet8 done
#
NAT service on /dev/vmnet8 done
#
Host-only networking on /dev/vmnet8 done
#
Virtual ethernet done
#

#
Configuring fallback GTK+ 2.4 libraries.
#

#
In which directory do you want to install the mime type icons?
#
[/usr/share/icons]
#

#
What directory contains your desktop menu entry files? These files have a
#
.desktop file extension. [/usr/share/applications]
#

#
In which directory do you want to install the application’s icon?
#
[/usr/share/pixmaps]
#
#
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
Trying to find a suitable vmmon module for your running kernel.
#
#
None of the pre-built vmmon modules for VMware Workstation is suitable for your
#
running kernel. Do you want this program to try to build the vmmon module for
#
your system (you need to have a C compiler installed on your system)? [yes]
#
#
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
#
#
What is the location of the directory of C header files that match your running
#
kernel? [/lib/modules/2.6.20-15-generic/build/include] /usr/src/linux-headers-2.6.20-15-generic/include
#
#
Extracting the sources of the vmmon module.
#
#
Building the vmmon module.
#
#
Using 2.6.x kernel build system.
#
make: Entering directory `/tmp/vmware-config1/vmmon-only’
#
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
#
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
#
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
#
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘compat_exit’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘exit_code’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 警告: 在 ‘_syscall1’ 的声明中,类型默认为 ‘int’
#
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] 错误 1
#
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] 错误 2
#
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
#
make: *** [vmmon.ko] 错误 2
#
make: Leaving directory `/tmp/vmware-config1/vmmon-only’
#
Unable to build the vmmon module.
#
#
For more information on how to troubleshoot module-related problems, please
#
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
#
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
#
#
Execution aborted.

上irc问了DkYu兄(在此表示感谢),得到如下解决办法:

代码:
#
cd /usr/lib/vmware/modules/source
#
sudo cp vmmon.tar vmmon.tar.old
#
sudo tar xvf vmmon.tar
#
sudo gedit vmmon-only/include/compat_kernel.h
#
找到
static inline _syscall1(int, compat_exit, int, exit_code); 并
#
替换成
#
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#
static inline _syscall1(int, compat_exit, int, exit_code);
#
#endif
#
sudo tar cvf vmmon.tar vmmon-only
#
sudo rm -rf vmmon-only

意思是内核是2.6.20的话,就不需要这个东西拉,这样改了之后,再进行配置,结果还是报错,如下:

代码:
1.
lly@lly:~$ sudo vmware-config.pl
2.
Making sure services for VMware Workstation are stopped.
3.

4.
Stopping VMware services:
5.
Virtual machine monitor done
6.
Bridged networking on /dev/vmnet0 done
7.
DHCP server on /dev/vmnet1 done
8.
Host-only networking on /dev/vmnet1 done
9.
DHCP server on /dev/vmnet8 done
10.
NAT service on /dev/vmnet8 done
11.
Host-only networking on /dev/vmnet8 done
12.
Virtual ethernet done
13.

14.
Configuring fallback GTK+ 2.4 libraries.
15.

16.
In which directory do you want to install the mime type icons?
17.
[/usr/share/icons]
18.

19.
What directory contains your desktop menu entry files? These files have a
20.
.desktop file extension. [/usr/share/applications]
21.

22.
In which directory do you want to install the application’s icon?
23.
[/usr/share/pixmaps]
24.
25.
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
26.
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
27.
Trying to find a suitable vmmon module for your running kernel.
28.
29.
None of the pre-built vmmon modules for VMware Workstation is suitable for your
30.
running kernel. Do you want this program to try to build the vmmon module for
31.
your system (you need to have a C compiler installed on your system)? [yes]
32.
33.
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
34.
35.
What is the location of the directory of C header files that match your running
36.
kernel? [/usr/src/linux-headers-2.6.20-15-generic/include]
37.
38.
Extracting the sources of the vmmon module.
39.
40.
Building the vmmon module.
41.
42.
Using 2.6.x kernel build system.
43.
make: Entering directory `/tmp/vmware-config2/vmmon-only’
44.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
45.
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
46.
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
47.
CC [M] /tmp/vmware-config2/vmmon-only/linux/hostif.o
48.
CC [M] /tmp/vmware-config2/vmmon-only/common/cpuid.o
49.
CC [M] /tmp/vmware-config2/vmmon-only/common/hash.o
50.
CC [M] /tmp/vmware-config2/vmmon-only/common/memtrack.o
51.
CC [M] /tmp/vmware-config2/vmmon-only/common/phystrack.o
52.
CC [M] /tmp/vmware-config2/vmmon-only/common/task.o
53.
CC [M] /tmp/vmware-config2/vmmon-only/common/vmx86.o
54.
CC [M] /tmp/vmware-config2/vmmon-only/vmcore/moduleloop.o
55.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.o
56.
Building modules, stage 2.
57.
MODPOST 1 modules
58.
CC /tmp/vmware-config2/vmmon-only/vmmon.mod.o
59.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.ko
60.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
61.
cp -f vmmon.ko ./../vmmon.o
62.
make: Leaving directory `/tmp/vmware-config2/vmmon-only’
63.
The module loads perfectly in the running kernel.
64.
65.
This program previously created the file /dev/vmmon, and was about to remove
66.
it. Somebody else apparently did it already.
67.
68.
This program previously created the file /dev/parport0, and was about to remove
69.
it. Somebody else apparently did it already.
70.
71.
This program previously created the file /dev/parport1, and was about to remove
72.
it. Somebody else apparently did it already.
73.
74.
This program previously created the file /dev/parport2, and was about to remove
75.
it. Somebody else apparently did it already.
76.
77.
This program previously created the file /dev/parport3, and was about to remove
78.
it. Somebody else apparently did it already.
79.
80.
This program previously created the file /dev/vmnet0, and was about to remove
81.
it. Somebody else apparently did it already.
82.
83.
This program previously created the file /dev/vmnet1, and was about to remove
84.
it. Somebody else apparently did it already.
85.
86.
This program previously created the file /dev/vmnet8, and was about to remove
87.
it. Somebody else apparently did it already.
88.
89.
You have already setup networking.
90.
91.
Would you like to skip networking setup and keep your old settings as they are?
92.
(yes/no) [yes]
93.
94.
Extracting the sources of the vmnet module.
95.
96.
Building the vmnet module.
97.
98.
Using 2.6.x kernel build system.
99.
make: Entering directory `/tmp/vmware-config2/vmnet-only’
100.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
101.
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic’
102.
CC [M] /tmp/vmware-config2/vmnet-only/driver.o
103.
CC [M] /tmp/vmware-config2/vmnet-only/hub.o
104.
CC [M] /tmp/vmware-config2/vmnet-only/userif.o
105.
/tmp/vmware-config2/vmnet-only/userif.c: 在函数 ‘VNetCopyDatagramToUser’ 中:
106.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: ‘CHECKSUM_HW’ 未声明 (在此函数内第一次使用)
107.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
108.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: 所在的函数内只报告一次。)
109.
make[2]: *** [/tmp/vmware-config2/vmnet-only/userif.o] 错误 1
110.
make[1]: *** [_module_/tmp/vmware-config2/vmnet-only] 错误 2
111.
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic’
112.
make: *** [vmnet.ko] 错误 2
113.
make: Leaving directory `/tmp/vmware-config2/vmnet-only’
114.
Unable to build the vmnet module.
115.
116.
For more information on how to troubleshoot module-related problems, please
117.
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
118.
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
119.
120.
Execution aborted.

结果自己依葫芦画瓢,把vmnet.tar给解压了,把里面的userif.c和bridge.c里面都CHECKSUM_HW给注释掉了,再进行配置,果然就可以了,哈哈。
我的vmware又正常啦!