Opera in Linux: “W: Target Packages . . . is configured multiple times”

As described in another post, I was working in a new Xubuntu installation. I had just installed Synaptic, gedit, and the Opera browser. When I clicked Reload in Synaptic, I got an error message:

An error occurred

The following details are provided:

W: Target Packages (non-free/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target Packages (non-free/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target Packages (non-free/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target Translations (non-free/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target Translations (non-free/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target DEP-11 (non-free/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4
W: Target DEP-11-icons (non-free/dep11/icons-64×64.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list.d/opera-stable.list:4

A search led to (1 2) suggestions to edit the sources.list file by using these commands:

sudo -i gedit /etc/apt/sources.list
sudo apt-get update

The first command opened a gedit (editor) session. In that session, I looked for the lines that might be repeatedly referring to the foregoing repositories (e.g., the “non-free/binary-amd64/Packages” mentioned in the first of those error messages). Then I noticed that (a) there were no repeated lines in the sources.list file and (b) the error messages all referred to Opera.

A revised search led to a suggestion that I might want to edit the opera-stable.list file rather than sources.list. A similar command (sudo -i gedit /etc/apt/sources.list.d/opera-stable.list) opened that opera file. Its first lines said, “This file makes sure that Opera Browser is kept up-to-date as part of regular system upgrades.”

Looking again at the error messages, they seemed to be saying that the duplication was in line 52 of sources.list and line 4 of opera-stable.list. The latter line read, “deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases).” I went into gedit > Edit > Preferences > Display line numbers, and then took another look at sources.list. Sure enough, line 52 said the same thing, but without the “#Opera Browser (final releases)” comment at the end. So apparently this line 52 was already doing the work of keeping Opera updated.

It seemed that simply deleting the opera-stable.list file might cause problems, if some other program ever went looking for it, or possibly the deleted file would just be recreated. On the other hand, I figured that it made sense to have my list of active repositories in the sources.list file, so I didn’t want to comment out line 52 by adding a hash mark (#) in front of it. I decided to do that in the opera-stable.list file instead. So now the latter had no active lines: they were all just comments.

With that hash mark added at the start of line 4 in opera-stable.list, I saved and closed these sources files. I restarted Synaptic and clicked Reload. This time, no error message. Problem solved!

Advertisements
This entry was posted in Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s