背景
系统版本:Mac OS X Lion
使用 rvm install ree 报错:./ext/purelib.rb:2: [BUG] Segmentation fault
解决方法
export CC=/usr/bin/gcc-4.2
如果还是无法安装,请尝试先 rvm remove ree 后再行安装,即:
rvm remove ree
export CC=/usr/bin/gcc-4.2
rvm install ree
参考
背景
系统版本:Mac OS X Lion
使用 rvm install ree 报错:./ext/purelib.rb:2: [BUG] Segmentation fault
解决方法
export CC=/usr/bin/gcc-4.2
如果还是无法安装,请尝试先 rvm remove ree 后再行安装,即:
rvm remove ree
export CC=/usr/bin/gcc-4.2
rvm install ree
参考
今晚在 MBP 上装 mongo 开发环境时遇到了个问题,在此记录下。
环境
MacOS Lion 自带PHP 5.3.6,安装在 /usr 下,另外自己又编译安装了PHP 5.3.8,安装在 /opt/php 下,也就是说目前系统存在两个版本的 PHP,根据 $PATH 的查询顺序,默认的 PHP 版本为系统自带的 5.3.6
问题 & 解决方法
在编译安装 mongo 扩展时发现在 make install 时,扩展会被安装至 /usr/lib/php/extensions/no-debug-non-zts-20090626/,这并非我要的结果,原先想直接 copy 到 5.3.8 版本目录下,后来想想编译环境可能会不同,怕会有版本差异导致运行不稳定,还是研究下吧。
重新解压缩源码,使用 5.3.8 版本的 phpize 配置完后发现目录下的 configure.in 文件被更新了,打开粗阅了下发现和 php-config 有关,经过尝试后得出解决方法:
cd mongo-1.2.6
/opt/php/bin/phpize
./configure –prefix=/opt/php –with-php-config=/opt/php/bin/php-config
make
make install
关键在于第三行指定 php-config 语句。最终 make install 执行后显示:
Installing shared extensions: /opt/php/lib/php/extensions/no-debug-non-zts-20090626/
至此问题解决。
在终端中输入 ls -l 常常可以看到部分文件的结尾含有@符号,如:
-rw-r–r–@ 1 Wayne staff 14789551 10 13 20:59 php-5.3.8.tar.gz
平时在忙工作就没细究,直到今天在v2ex看到有朋友提出了这个问题,参考了回帖中提及的资料做了此份笔记。
它是什么
文件的扩展属性标记
如何管理
xattr用于访问和管理这些元数据,用法如下:
平台
Windows 7 简体中文版,基于 Parallels Desktop
问题一:安装过程、登录界面及菜单乱码
控制面版 -> 时钟语言区域 -> 更改显示语言 -> 切换为“管理”标签 -> 在非Unicode程序的语言中点击“更改系统区域设置”改为“中文(简体 中国)” -> 确定 -> 重新启动电脑 -> 重新安专业版网银
问题二:转账过程中提醒时间错误
控制面板 -> 区域设置 -> 将时间格式从 yyyy/mm/dd 修改为 yyyy-mm-dd
原文:http://blog.sina.com.cn/s/blog_549097390100qaf2.html
相关目录
使任务生效
执行上述操作后任务会立即生效,且重启系统后也会自动生效。如果 plist 没有放在指定的目录,重启系统后不会再生效。
如果 plist 存在 Key Disabled,且其值为 true,launchctl load 会提示 nothing found to load,系统启动时也不会自动生效人物,如果要手动强制启动,忽略 Disabled 为 true 带来的影响,传递 -wF 参数给 launchctl 即可。
使任务失效
执行上述操作后,任务会立即失效,plist 文件不会被移除,但是如果不将其从相关目录移走的话,重启系统后任务仍然会自动生效。
plist 文件范例
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>name.zhengwei.test</string>
<key>ProgramArguments</key>
<array>
<string>/Users/Wayne/Desktop/test.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>10</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/test.err</string>
<key>StandardOutPath</key>
<string>/tmp/test.out</string>
</dict>
</plist>
参考链接
TODO
KeepAlive
需要先添加EPEL(Extra Packages for Enterprise Linux) repository:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
然后使用yum安装即可:
yum install git
From:http://51hired.com/questions/13038/centos%E4%B8%8A%E5%A6%82%E4%BD%95yum%E5%AE%89%E8%A3%85git
参考:什么是EPEL
git config –global branch.master.remote origin
git config –global branch.master.merge refs/heads/master
参考:
git pull的默认地址
How do you get git to always pull from a specific branch?