更新(2015 年 2 月 22 日):

更新(2015 年 2 月 22 日):

我最近从 Ubuntu Desktop 13.04 迁移到 Ubuntu Server 13.10,现在我的文件系统似乎不支持 unicode 字符。我使用 rsync 备份/同步文件,它显示了正确的字符,但它想要删除不匹配的文件名并创建一个转义版本。

例如:

root@ubuntu-server:~# rsync -avh --progress --delete --dry-run --exclude \$RECYCLE.BIN /media/source/ /media/target/

deleting Tiësto - Ten Seconds Before Sunrise.mp3
Ti\#353sto - Ten Seconds Before Sunrise.mp3

另外,如果我将 unicode 文件复制到文件系统,它会显示为:

drwxr-xr-x 3 root root      4096 Jan 21  2013 DJ Ti?sto/

我尝试通过安装unicode库,apt-get install unicode但似乎没有起到任何作用来解决问题。

更新:现在这可能是一个内核问题。我正在通过 samba/cifs 进行复制,并尝试通过指定 utf8 字符集,mount -t cifs //192.xxx.xxx.xxx/source/ /media/target/ -o iocharset=utf8但这会产生错误...

mount error(79): Can not access a needed shared library
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

检查内核日志发现了这个小宝贝:

root@ubuntu-server:~# tail /var/log/kern.log
Nov 30 03:51:33 ubuntu-server kernel: [ 1756.518222] CIFS VFS: CIFS mount error: iocharset utf8 not found

如何在内核中获得 utf8 支持?

有任何想法吗?

答案1

好的,经过上述故障排除和大量谷歌搜索后......我发现了这个错误报告解决方案已解释。基本上,如果您执行 Ubuntu Server 最小安装,您将获得最小驱动程序。我猜有人认为 utf8 不够重要,不足以包含在最小驱动程序集中。因此,如果您执行该安装类型,则需要稍后安装该linux-image-extra-virtual包以获得 utf8 支持。232 MB 的附加驱动程序支持 utf8 字符集...高效。:-/ 无论如何,这解决了问题。

root@ubuntu-server:~# apt-get install linux-image-extra-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
    crda iw libnl-3-200 libnl-genl-3-200 linux-firmware linux-image-3.11.0-13-generic
    linux-image-extra-3.11.0-13-generic linux-image-generic wireless-regdb
The following NEW packages will be installed:
    crda iw libnl-3-200 libnl-genl-3-200 linux-firmware linux-image-3.11.0-13-generic
    linux-image-extra-3.11.0-13-generic linux-image-extra-virtual
    linux-image-generic wireless-regdb
0 upgraded, 10 newly installed, 0 to remove and 12 not upgraded.
Need to get 73.5 MB of archives.
After this operation, 232 MB of additional disk space will be used.

测试utf8文件复制:

root@ubuntu-server:~# cp -a /media/source/DJ* /media/target/.

然后检查:

root@ubuntu-server:~# ll
drwxr-xr-x 3 root root      4096 Jan 21  2013 DJ Tiësto/

更新(2015 年 2 月 22 日):

--no-install-recommends如果您使用参数,您可能能够摆脱更轻量的安装apt-get我还没试过,但也许你可以如果您遇到了这个问题。

您可以尝试:

apt-get install --no-install-recommends linux-image-extra-virtual

如果这不能解决问题,只需重新安装,但请遵循建议:

apt-get install --reinstall linux-image-extra-virtual

相关内容