美文网首页
记录Ubuntu18.04遇到的一些问题

记录Ubuntu18.04遇到的一些问题

作者: Guuuj | 来源:发表于2019-10-10 09:27 被阅读0次

2019-06-26

安装Ubuntu18.04后,发现终端不能输入中文

$ locale -a
C
C.UTF-8
...
en_US.utf8
...
zh_CN.utf8
...

发现系统中支持zh_CN.utf8,配置下zh_CN.UTF-8字符集
在~/.bashrc中配置

exprot LC_ALL="zh_CN.UTF-8"

OK,使用没问题

2019-06-27

配置好android编译环境后,编译android7.1.2,遇到如下错误

FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)

看报错应该和locale相关,日期时间使用zh_CN.UTF-8字符集有问题?
看来上面配置的,在一些情况下是有问题的,继续查看系统支持的字符集

$ locale -a
C
C.UTF-8
...
en_US.utf8
...
zh_CN.utf8
...

C.UTF-8发现一个奇怪的配置,查了下和C的区别:

C = POSIX standards-compliant default locale. Only strict ASCII characters are valid.
C.UTF-8 = POSIX standards-compliant locale, extended to allow the basic use of UTF-8. No character upper-lower case relationships and collation orders defined beyond ASCII.

唔嗯符合POSIX标准,运行使用UTF-8,配置下试试
在~/.bashrc中配置

export LC_ALL=C.UTF-8

终端可以正常输入中文,然后去编译,(一段时间后)

#### make completed successfully  ####

完美解决

2019-09-26

今天重启遇到如下问题

/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.

Inodes that were part of a corrupted orphan linked list found.

/dev/mapper/ubuntu-vg-root: UNEXPECTED INCONSISTENCY; Run fsck MANUALLY.
 
(i.e., without -a or -p options)

fsck exited with status code 4.

The root file system on/dev/mapper/ubuntu--vg-root requires manual fsck

按照提示fsck

(initramfs) fsck /dev/mapper/ubuntu--vg-root

然后再对fix提示输入'y'修复对应的问题

相关文章

网友评论

      本文标题:记录Ubuntu18.04遇到的一些问题

      本文链接:https://www.haomeiwen.com/subject/hpoguctx.html