簡體   English   中英

ubuntu apt-add-repository顯示錯誤

[英]ubuntu apt-add-repository showing error

當我嘗試此命令

  sudo apt-add-repository ppa:jd-team/jdownloader

我收到此錯誤

Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 22, in <module>
    sys.stdout.detach(), encoding="UTF-8", line_buffering=True)
AttributeError: 'file' object has no attribute 'detach'

請幫助我刪除此錯誤。

您以某種方式使用python2運行/usr/bin/apt-add-repository ,您要么需要將shebang更改為#! /usr/bin/python3 #! /usr/bin/python3或您已經更改了python3指向的內容。 運行head -n 1 /usr/bin/apt-add-repository將向您顯示shebang當前設置為什么。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM