Ubuntu18.04啟動登錄提示/usr/bin/locale-check:Permission denied


登錄用戶時彈窗提示

/etc/profile.d/01-locale-fix.sh: /usr/bin/locale-check: No such file or dictionary

上網搜索發現沒什么好辦法,就是從另一台Ubuntu18.04的機器里面把locale-check復制過來就行了

 

但是重啟后登錄用戶又提示

/etc/profile.d/01-locale-fix.sh: /usr/bin/locale-check:Permission denied

又是一大圈搜索,好像比較靠譜的就是一個說重裝10.1ubuntu2.5的,參考https://askubuntu.com/questions/1096110/bash-usr-bin-locale-check-no-such-file-or-directory-error-after-i-downgraded

但是操作之后,執行

$ sudo sh /etc/profile.d/01-locale-fix.sh
/etc/profile.d/01-locale-fix.sh 2: /etc/profile.d/01-locale-fix.sh: /usr/bin/locale-check:Permission denied

還是報錯

 

/etc/profile.d/01-locale-fix.sh里面只有一句有效的語句,就是第二句

eval $(/usr/bin/locale-check C.UTF-8)

這個.sh文件和locale-check所有者都是root,權限也差不多,沒辦法我就想改改權限,讓它可以執行下去

解決

$ sudo nautilus

用root打開文件管理器,然后把那個locale-check的屬性中permissions下的allow executing file as program屬性勾選了,嘗試執行上面的.sh文件就沒問題了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM