Skip to content

[已解決][Linux] Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/teamviewer.list:25 and /etc/apt/sources.list.d/teamviewer.list:30

Last Updated on 2021-10-09 by Clay

在我們使用 sudo apt update 時,有時會看到以下的錯誤消息:

Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/teamviewer.list:25 and /etc/apt/sources.list.d/teamviewer.list:30


也許不一定是 teamviewer.list、或許會是其他的套件。那麼這樣的錯誤消息是什麼意思呢?

其實說穿了非常單純,這是因為在 teamviewer.list(或其他 xxx.list)當中,其中有『設定重複了』。

以下直接來看看我的例子。


解決方法

比方說,我就要前往我的 teamviewer.list 檔案查看究竟是哪裡的設定重複:

vim /etc/apt/source.list.d/teaviewer.list


我會看到以下文件:

###   TeamViewer DEB repository list

### NOTE: Manual changes to this file
###        - prevent it from being updated by TeamViewer package updates
###        - will be lost after using the 'teamviewer repo' command
###       The original file can be restored with this command:
###       cp /opt/teamviewer/tv_bin/script/teamviewer.list /etc/apt/sources.list.d/teamviewer.list
###       which has the same effect as 'teamviewer repo default'

### NOTE: It is preferred to use the following commands to edit this file:
###       teamviewer repo                - show current repository configuration
###       teamviewer repo default        - restore default configuration
###       teamviewer repo disable        - disable the repository
###       teamviewer repo main [stable]  - make all TeamViewer packages available (default)
###       teamviewer repo tv14 [stable]  - make TeamViewer 14 packages available
###                             stable     omit preview and beta releases


### Choose stable main to receive updates for TeamViewer 14 and upcoming major releases
### Choose preview main to receive early updates for TeamViewer 14 and to receive major beta releases

### Choose stable tv14 to receive updates for TeamViewer 14
### Choose preview tv14 to receive early updates for TeamViewer 14

deb http://linux.teamviewer.com/deb stable main
# deb http://linux.teamviewer.com/deb preview main

# deb http://linux.teamviewer.com/deb stable tv14
# deb http://linux.teamviewer.com/deb preview tv14
deb http://linux.teamviewer.com/deb stable main


可以看到,其中 "deb http://linux.teamviewer.com/deb stable main" 這行重複了。只要刪去這行, sudo apt update 應該就不會再有這樣的報錯了。


References


Read More

Tags:

Leave a Reply取消回覆

Exit mobile version