Announcement

Collapse
No announcement yet.

apt-get update fails

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] apt-get update fails

    In Terminal, :~$ sudo apt-get update fails with this result:-
    Code:
    Hit:1 https://ppa.launchpadcontent.net/gambas-team/gambas3/ubuntu jammy InRelease [/COLOR]
    Ign:2 http://gb.archive.ubuntu.com/ubuntu jammy InRelease                                                    
    Ign:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
    Ign:4 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease                  
    Ign:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
    Ign:5 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
    Ign:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
    Ign:2 http://gb.archive.ubuntu.com/ubuntu jammy InRelease                        
    Err:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
     Connection failed [IP: 185.125.190.36 80]
    Ign:4 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease
    Ign:5 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
    Ign:2 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
    Ign:4 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease
    Ign:5 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
    Can't find a solution to this at the moment so any advice would be welcome.

    Kubuntu 22.04


    #2
    Originally posted by bill-lancaster View Post
    Code:
    Err:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
    Connection failed [IP: 185.125.190.36 80]
    I am going to guess a local or temporary routing issue, or server disconnected/rebooted? I can connect to this just fine here.
    security.ubuntu.com doesn't have the international mirror system that the main Ubuntu repos have, so switching from the local GB mirrors to different ones will make any difference here.
    You just need to try again in a few moments. It most likely will resolve momentarily, if it hasn't already.

    Comment


      #3
      Thanks claydoh, have had this problem more than a day now.

      Also Discover shows most apps as 'Downloading'

      Comment


        #4
        Can you go to http://security.ubuntu.com/ubuntu and 185.125.190.36 in your web browser?
        Can you ping either one in the terminal?
        Are you using any proxy or VPN? Custom firewall settings?

        The DNS server your ISP, your router, or your local computer is set to use could be barfing.
        Unfortunately it is not really on OS issue, but a networking one, but it could be anywhere between you and that url.

        Can you try a different connection (wired vs wireless, or tether to a mobile), or disconnect and reconnect, other silly things like restarting a router, even.

        Originally posted by bill-lancaster View Post
        Also Discover shows most apps as 'Downloading'
        That doesn't mean much, really, as it is just a status level the developers have set for progress display purposes.

        Comment


          #5
          Thanks cladoh
          Can't access those websites but can ping the ip address.
          I'm not using VPN etc.

          Tethered to my mobile phone.

          Code:
          $ sudo apt-get update
          [sudo] password for bill:  
          Reading package lists... Done
          E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1341 (packagekitd)
          N: Be aware that removing the lock file is not a solution and may break your system.
          E: Unable to lock directory /var/lib/apt/lists/]
          ​
          regards

          Comment


            #6
            I have no idea what's going on with the security repo. I don't see others with the same issue as of yet.

            Is your system clock accurate and updated?

            As to this:
            Originally posted by bill-lancaster View Post

            Code:
            $ sudo apt-get update
            [sudo] password for bill:
            Reading package lists... Done
            E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1341 (packagekitd)
            N: Be aware that removing the lock file is not a solution and may break your system.
            E: Unable to lock directory /var/lib/apt/lists/]
            ​
            That is just because Discover is checking for updates in the background at that moment. Apt uses a lock file to prevent more than one instance of itself from running at the same time.

            It is not uncommon for these lock files to get left behind accidentally, though. If this message persists after a while (and there is no process PID number 1341 running), and especially after a reboot, it is ok to delete the lock file in the messaging.

            Comment


              #7
              Discover has been checking for updates for some time now (days), after several reboots.

              :~$ ps aux does not show PID 1342 as running.

              Would it be ok to delete the lock file(/var/lib/apt/lists/lock), message warns that:-
              Code:
              N: Be aware that removing the lock file is not a solution and may break your system.

              Comment


                #8
                Originally posted by bill-lancaster View Post
                Would it be ok to delete the lock file(/var/lib/apt/lists/lock)
                Yes, as the PID that created it is no longer present.
                Last edited by claydoh; Feb 23, 2023, 10:08 AM.

                Comment


                  #9
                  OK, backed up everything and removed the lock file.
                  No change, still get same error message with 'sudo apt-get update'
                  I've noticed some odd things recently, custom short cuts missing, startup items missing, and more.
                  This is a fairly recent install of k22.04 so I think I'll re-install it.
                  Thanks for your help and advice

                  Comment


                    #10
                    OK, completely fresh install of v22.04 and I still have the same problem.
                    After the new system booted I set up the wifi then tried 'sudo apt update', nothing else.
                    What's going on?

                    Comment


                      #11
                      So if you can ping the adresses claydoh mentioned above in #4, but cannot reach them in a web browser - does the same happen with another device (mobile phone, second computer, tablet) within your network?

                      In this case the culprit is neither Kubuntu 22.04 nor your computer but probably something between your router, your ISP and the target server.
                      It also could be a problem with name resolution (DNS) directly - did you try using another DNS server in System Settings/Network like 1.1.1.1 (or in the settings of your router)?
                      Did you clear the caches in the router (simply try switching it off for a while if the option does not exist)?
                      Last edited by Schwarzer Kater; Feb 24, 2023, 05:56 AM. Reason: typos et al
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #12
                        A W10 computer and a Kubuntu on same network is fine.
                        While writing this post I noticed the 'updates available' icon in the System Tray. Clicked on update-all and many updates were installed (being a fresh O/S).
                        Then 'sudo apt update' worked fine.
                        The problem has 'gone away', I think some process somewhere was stuck in an update.
                        Thanks for all the help and advice.

                        Comment


                          #13
                          How do I set this topic as 'solved' ?

                          Comment


                            #14
                            Return to first post. Click Edit. Drop down list to left of Topic title. Select [SOLVED]
                            Using Kubuntu Linux since March 23, 2007
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Thanks Snowhog.
                              BTW now that evruthing is working I notice that Discover shows 'Up to date' rather than 'updating'

                              Comment

                              Working...
                              X