Apple最新的Leopard更新导致Perl无法正常使用

Apple这次做了一个很不专业的事情,在最新的Mac OS X Security Update 2009-001中,竟然使用了老的Perl IO XS bundle。安装更新后,运行cpan或者perl -MIO会得到以下错误信息:

IO object version 1.22 does not match bootstrap parameter 1.23 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/XSLoader.pm line 94.
Compilation failed in require at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/IO/Handle.pm line 263.

看来,apple竟然将IO xs bundle回滚到1.22, 但是相应的IO.pm则仍然是1.23, 无语。

由于IO无法启用,cpan也break了。 只能手动下载 CPAN IO 1.2301,重新make install后才解决。

看来perl还是要自己编译才好,要想不出这种问题,可以考虑使用local::lib了。

PS:
彻底歇菜,看看这次更新了哪些bundle:

lsbom -f -s /Library/Receipts/boms/com.apple.pkg.update.security.2009.001.bom | grep -i perl
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/config.h
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/embed.h
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/libperl.dylib
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/patchlevel.h
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/proto.h
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/Config_heavy.pl
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/B/B.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/B/C/C.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/ByteLoader/ByteLoader.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Cwd/Cwd.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DB_File/DB_File.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Data/Dumper/Dumper.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Devel/DProf/DProf.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Devel/PPPort/PPPort.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Devel/Peek/Peek.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Digest/MD5/MD5.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/Byte/Byte.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/CN/CN.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/EBCDIC/EBCDIC.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/Encode.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/JP/JP.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/KR/KR.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/Symbol/Symbol.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/TW/TW.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Encode/Unicode/Unicode.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Fcntl/Fcntl.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/File/Glob/Glob.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Filter/Util/Call/Call.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/I18N/Langinfo/Langinfo.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/IO/IO.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/IPC/SysV/SysV.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/List/Util/Util.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/MIME/Base64/Base64.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/NDBM_File/NDBM_File.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Opcode/Opcode.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/POSIX/POSIX.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/PerlIO/encoding/encoding.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/PerlIO/scalar/scalar.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/PerlIO/via/via.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/SDBM_File/SDBM_File.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Socket/Socket.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Storable/Storable.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Sys/Hostname/Hostname.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Sys/Syslog/Syslog.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Time/HiRes/HiRes.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/Unicode/Normalize/Normalize.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/XS/APItest/APItest.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/XS/Typemap/Typemap.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/attrs/attrs.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/re/re.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/threads/shared/shared.bundle
./System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/threads/threads.bundle
./System/Library/Perl/5.8.8/pods/perldiag.pod
./usr/bin/perl
./usr/bin/perl5.8.8
./usr/bin/perlbug
./usr/share/man/man1/find2perl.1.gz
./usr/share/man/man1/perlbug.1.gz
./usr/share/man/man1/perlcc.1.gz
./usr/share/man/man1/perldiag.1.gz
./usr/share/man/man1/perlivp.1.gz

修复:
1.重新下载IO安装
2.重新编译CPAN
3.Config::Auto
4.其他不正常的module

累人。

买了Apple时间胶囊(Time Capsule)配置802.11n无线网络

经老婆大人的特许和赞助,今天中午吃饭前跑了趟三里屯的apple直营店,把想了很久的TC搬回了家。
头次去三里屯,在apple store周围转了好几圈,还问了奥运志愿者,才找到店。中午吃饭,人不多,
不过里面的30′ 的iMac让我眼馋半天,要赶回家吃饭匆匆付款回来。
吃饭后拆开,比以前网上图片感觉要好,漂亮很多。说明书很简单,我觉得都有些简陋。
光盘对我也没用,因为leopard自带了更新的airport工具。

插上电源后,运行airport工具很快找到TC。对于如何使用TC,倒是仔细考虑了很长时间,因为目前
我除了MBP是支持802.11n,其他包括iphone都只能支持802.11g,现在上网也用了一个dlink的无线
路由,时间胶囊具备基本的无线路由功能,但是相比dlink也缺少防火墙之类的功能(虽说也没大用)。
但是如果使用时间胶囊作为上网路由,那么就必须使用802.11n(b/g兼容)模式,这种模式,基本上无法
享受802.11n的高速率,因为如果跑在兼容模式下,如果有b/g客户端在发送数据,那么会导致n的客户端
也将降低速度,如果用于上网,其他几个机器肯定会长时间发送数据的。
所以,最终我设计了以下网络结构:

WAN(ADSL)--DLINK(HomeDlink)--TC(HomeTC)

保持现有的无线网络(HomeDlink),继续为老客户端提供无线上网,TC使用以太网连接到Dlink,并创建一个新的无线网
(HomeTC). HomeTC通过网桥形式桥接到Dlink实现Internet接入。

这样,T41,HP,Iphone等那些老的机器可以通过Dlink来上网,它们也可以通过Dlink连接到TC,使用TC的共享磁盘存储或者其他扩展空间。
MBP等支持802.11n的客户端则直接连接到TC,使用TC作为时间机器和备份存储空间。

关于使用时间胶囊作为时间机器的备份磁盘:
1. 首先要配置,将一些磁盘卷或目录排除掉,这样可以减少第一次全备份的时间
2. 时间胶囊的千兆网卡似乎不稳定,我试了几次,不知道是否网线问题,中断了好几次
3. 第一次一定要使用802.11n,否则备份时间会非常长,据说有的人要跑1个晚上?我是67G的数据大概2个小时不到。

时间胶囊的几个问题:
1. usb口不仅仅可以连接打印机,还可以接扩展磁盘,如果连接一个usb hub,扩展性那就海了
2. 时间胶囊的磁盘不支持分区,是指airport工具没有这个功能,如果你分好区,也是支持的。比如,你可以将磁盘从TC取出来,然后分区,再放回去就可以了。 usb外接的磁盘也是一样的。
3. 运行时很热,摸着很烫