上兵伐谋

“上兵伐谋,其次伐交,其次伐兵,其下攻城”。
posts - 35, comments - 32, trackbacks - 0, articles - 3

很多人在Linux下用cedega玩游戏会遇到error=21的错误,比如
/usr/lib/transgaming_cedega//winex/bin/wine: can't exec 'nfs.exe': error=21

很多邮件组里有人建议说要修改内核参数,大致方法就是向/proc下的某个文件里输出一个什么标志,具体我也记不清了。这种方法太复杂,而且,没有效果。

事实上,TransGaming官方的文档里已经给出了关于error=21的原因和解决办法:

Exec (error = 21)
-----------------
Some distributions' versions of mount now run with the noexec option unless
otherwise specified. Running games from a partition mounted with noexec can
cause an error = 21 message.

To fix this issue, edit /etc/fstab and modify the partition line by
changing 'noexec' to 'exec' in the mount options.

For example, change:
/dev/hda1 / ext3 errors=remount-ro,no-exec,defaults 0 1
to:
/dev/hda1 / ext3 errors=remount-ro,exec,defaults 0 1

If neither "exec" nor "no-exec" appears in the line it is recommended that you
add "exec" to ensure that the partition can be used by Cedega.

To remount the partition run:
$ mount -o remount /

因此,关于error=21最简单的解决办法就是,把游戏的文件拷贝到具有可执行权限的分区。彻底点的办法是,修改fstab,在游戏文件所在分区的挂载参数里加上exec。OK,搞定!
Enjoy your game!

只有注册用户登录后才能发表评论。