Cant Add the repository (Ubuntu)

Questions about Wine on Linux
Locked
JJFX
Newbie
Newbie
Posts: 1
Joined: Wed May 22, 2019 9:31 am

Cant Add the repository (Ubuntu)

Post by JJFX »

Hi,

So I cannot make it to work. I have broken my sources.list and I cannot update now properly. I have bunch of warnings and few errors upon updating:

Code: Select all

Hit:1 http://au.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,257 B]      
Hit:3 http://au.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:4 http://au.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Ign:5 http://dl.google.com/linux/chrome/deb stable InRelease                   
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]    
Hit:7 http://ppa.launchpad.net/lutris-team/lutris/ubuntu bionic InRelease      
Ign:8 https://dl.winehq.org/wine-builds/ubuntu/dists bionic InRelease          
Hit:9 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:11 http://ppa.launchpad.net/paulo-miguel-dias/mesa/ubuntu bionic InRelease 
Ign:12 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic InRelease        
Get:13 https://dl.winehq.org/wine-builds/ubuntu bionic/main amd64 Packages [404 kB]
Err:14 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release          
  404  Not Found [IP: 91.189.95.83 80]
Get:15 https://dl.winehq.org/wine-builds/ubuntu bionic/main i386 Packages [426 kB]
Err:16 https://dl.winehq.org/wine-builds/ubuntu/dists bionic Release
  404  Not Found [IP: 151.101.30.217 443]
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en_AU) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu/dists bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en_AU) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:52 and /etc/apt/sources.list:54
And this is my sources.list:

Code: Select all

# deb cdrom:[Ubuntu 18.04.2 LTS _Bionic Beaver_ - Release amd64 (20190210)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://au.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://au.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://au.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic universe
deb http://au.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://au.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://au.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://au.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/bionic main
deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ bionic main
deb https://dl.winehq.org/wine-builds/ubuntu/dists/ bionic main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/dists/ bionic main
Can I just manually remove all that sh.it that has 'bionic' in name? Which is most of the file.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Cant Add the repository (Ubuntu)

Post by Bob Wya »

JJFX wrote:Hi,

So I cannot make it to work. I have broken my sources.list and I cannot update now properly. I have bunch of warnings and few errors upon updating:
...
Can I just manually remove all that sh.it that has 'bionic' in name? Which is most of the file.
Wow... Hmmm that it is pretty broken!

Back all your source.list{,.d} repositories:

Code: Select all

sudo rsync -achv --progress /etc/apt/ /etc/apt.bak/
Then just script remove all the repositories which reference wine, with:

Code: Select all

sudo sed -i -e '\|https://dl.winehq.org/wine-builds|d' \
            -e '\|http://ppa.launchpad.net/ubuntu-wine|d' \
                /etc/apt/sources.list /etc/apt/sources.list.d/*.list
A simple, readable/robust use of sed to only delete matching (URI) lines from your main:

Code: Select all

/etc/apt/sources.list
file, and any additional repository files (typically where ppa-based repositories get put) in the:

Code: Select all

/etc/apt/sources.list.d
directory...

Bob
Cybermax
Level 4
Level 4
Posts: 218
Joined: Fri Dec 01, 2017 5:26 pm

Re: Cant Add the repository (Ubuntu)

Post by Cybermax »

JJFX wrote:Hi,

So I cannot make it to work. I have broken my sources.list and I cannot update now properly. I have bunch of warnings and few errors upon updating:

Can I just manually remove all that sh.it that has 'bionic' in name? Which is most of the file.
The errors you post refers to repo's being configured multiple times. You should only have 1 line of each in the sources.list file.

Not sure what has happened, other than a theory that you might have followed the "how to install wine" list on the wiki every time, and thus every time running the line:

Code: Select all

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 
when installing/upgrading or perhaps switching between stable/devel/staging... and that is certainly not the way to go.

If you can't get it fixed yourself, i can quickly paruse your sources.list file and fix that, but if you follow the tips on the previous post, i think much will be fixed by that :)

PS. Even tho the Ubuntu Wiki page uses that "sudo apt-add-repository" line, I personally do not like adding PPA's to the "main" sources.list file, EXACTLY due to harder to fix problems if you mess it up like you have. Using separate files in the "sources.list.d" folder is the way to go, and a LOT easier to disable repo's and whatnot without messing up your system and distro packages :)
Locked