刪除Flatpak後無法登入

刪除Flatpak後無法登入

我已經安裝了 flatpak 來運行應用程式。由於它不太有效,我使用以下命令將其刪除:

sudo apt remove flatpak

重新啟動時,我收到以下錯誤。有一個“確定”按鈕,但我無法點擊它,甚至無法進入桌面。滑鼠不起作用,鍵盤也不起作用。

我運行的是 Ubuntu 19.04。這是錯誤:

Error found when loading /etc/profile:

/etc/profile.d/flatpak.sh: line25: flatpak: command not found

As a result the session will not be configured correctly. 
You should fix the problem as soon as feasibile.

答案1

您可以嘗試透過清除再次刪除它

sudo apt-get purge flatpak

或刪除其剩菜

sudo rm /etc/profile.d/flatpak.sh
sudo rm /etc/X11/Xsession.d/20flatpak

然後重新啟動。

答案2

要解決這種情況,您必須刪除或註解掉設定檔中的該行,步驟如下:

  1. 切換到登入控制台Ctrl++ AltF1然後

  2. 找到該檔案並刪除導致啟動問題的行:

    sudo sed -i.bak '25d' /etc/profile
    
  3. 去除任何殘留物

    sudo rm -rf /etc/profile.d/flatpak.sh
    sudo rm -rf /etc/X11/Xsession.d/20flatpak
    
  4. 重新啟動系統

相關內容