Score:2

Can no longer use sudo apt update. Running 20.04

mz flag
Neo

Was trying to install wine but came across an error:

Running lsb_release gives:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute
vnc@CustomSite:/etc/apt$ sudo apt-get update
Hit:1 http://mirrors.digitalocean.com/ubuntu hirsute InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Ign:4 https://packages.sury.org/php hirsute InRelease
Hit:5 https://dl.winehq.org/wine-builds/ubuntu hirsute InRelease
Err:6 https://packages.sury.org/php hirsute Release
  404  Not Found [IP: 2606:4700:3030::ac43:b696 443]
Ign:7 http://ppa.launchpad.net/boost-latest/ppa/ubuntu hirsute InRelease
Ign:8 http://ppa.launchpad.net/jonathonf/wine/ubuntu hirsute InRelease
Err:9 http://ppa.launchpad.net/boost-latest/ppa/ubuntu hirsute Release
  404  Not Found [IP: 2001:67c:1560:8008::19 80]
Err:10 http://ppa.launchpad.net/jonathonf/wine/ubuntu hirsute Release
  404  Not Found [IP: 2001:67c:1560:8008::19 80]
Reading package lists... Done
E: The repository 'https://packages.sury.org/php hirsute 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 'http://ppa.launchpad.net/boost-latest/ppa/ubuntu hirsute 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 'http://ppa.launchpad.net/jonathonf/wine/ubuntu hirsute 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.

nano sources.list gives:

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb [trusted=yes] http://mirrors.digitalocean.com/ubuntu/ hirsute main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ hirsute main restricted

Please help me past this error.

Thanks.

Neo

Neo avatar
mz flag
Neo
/etc/apt/sources.list.d/php.list:deb https://packages.sury.org/php/ hirsute main
Score:1
zw flag

You have several issues here with third-party repositories with your Ubuntu 21.04.
To fix them:

  1. Disable PPAs:

    sudo add-apt-repository -r ppa:boost-latest/ppa
    sudo add-apt-repository -r ppa:jonathonf/wine
    
  2. To disable https://packages.sury.org/php you have to locate its file using grep -r packages.sury.org /etc/apt --include=*.list.

    In your case run:

    sudo nano /etc/apt/sources.list.d/php.list
    

    and place # at the line deb packages.sury.org/php hirsute main, then press Ctrl+O for save, Ctrl+x to close.

  3. Restore normal default repositories - place the following into /etc/apt/sources.list:

    deb http://archive.ubuntu.com/ubuntu/ hirsute main universe multiverse restricted
    deb http://archive.ubuntu.com/ubuntu/ hirsute-updates main multiverse universe restricted
    deb http://archive.ubuntu.com/ubuntu/ hirsute-security main universe multiverse restricted
    

    replacing lines with digitalocean.

  4. Run sudo apt-get update .

  5. Install Wine from official repositories as it was planned by

    sudo add-apt-repository universe
    sudo rm /etc/apt/sources.list.d/archive_uri* # we remove winehq here
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt install wine64 wine32:i386
    
Neo avatar
mz flag
Neo
It shows sources.list.d is a directory
Neo avatar
mz flag
Neo
Should I delete both files in it?
N0rbert avatar
zw flag
No. What is the output of `grep -r packages.sury.org /etc/apt --include=*.list ` ?
Neo avatar
mz flag
Neo
Like this? grep -r packages.sury.org /etc/apt --include=*.list ? ? -. With the question mark and the dash sign?
N0rbert avatar
zw flag
You have to open Nano using `sudo nano /etc/apt/sources.list.d/php.list` and then place `#` at the line start, <Ctrl+O> for save, <Ctrl+x> to close. Then run `sudo apt-get update` .
Neo avatar
mz flag
Neo
Ok now what do I do?
N0rbert avatar
zw flag
After editing the file run `sudo apt-get update` and ensure that you do not have any errors.
Neo avatar
mz flag
Neo
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/126423/discussion-between-neo-and-n0rbert).
Neo avatar
mz flag
Neo
grep -r ^deb /etc/apt --include=*.list Neo Neo /etc/apt/sources.list:deb [trusted=yes] mirrors.digitalocean.com/… hirsute universe main restricted N0rbert N0rbert I would recommend to remove this line. Neo Neo Ok I'll try it N0rbert N0rbert 15:30 And place the default instead. Neo Neo what's the default? N0rbert N0rbert I'm uploading them. pastebin.com/nKwPhNxJ Neo Neo Ok now what? N0rbert N0rbert sudo apt-get update Neo Neo ok done N0rbert N0rbert 15:34 sudo apt-get install wine32:i386 wine64
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.