更新(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

相關內容