Showing posts with label unsupported updates. Show all posts
Showing posts with label unsupported updates. Show all posts

Sunday, July 11, 2010

Ubuntu 10.04: Problems with Update Manager and Software Sources

As described elsewhere, I was in the process of upgrading from Ubuntu 9.10 to 10.04 (Lucid Lynx).  I went into System > Administration > Update Manager.  At first, the system reported that I was up to date, as it often would do even when the system was terribly out of date.  I clicked Check and wound up with a message indicating that there was a problem with a repository.  I looked into System > Administration > Software Sources > Other Software.  The error message didn't make sense in light of what I saw there.  I tried Update Manager again.  This time it worked:  it was ready to install a bunch of updates for 9.10.  I skipped that and instead told it to upgrade the system to 10.04.  It did.

I ran Update Manager again, just to be sure.  Now I got the repository error message mentioned above.  It said this:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg.  Could not resolve 'us.archive.ubuntu.com'
There were a bunch of other, similar messages after that one, referring to other "Failed to fetch" problems.  I closed Update Manager and went into Software Sources, to see what this was about.  The sources listed there did not make sense, given that System > About Ubuntu reported that I was indeed running 10.04.  I checked them all -- the 9.10 CDROM, two "Unsupported updates" entries, and the http://archive.canonical.com/update karmic entries.  I went through the other tabs in Software Sources, while I was there, and made a few other changes, and then closed out.  It checked for updates and again gave me an error:
Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems . . . .
followed by similar "Failed to fetch" messages, e.g., "Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translate-en_US.bz2 Connection failed."  Before attacking that, I decided to take care of the next of my previous posts on the whole upgrade and tweaking process.  This post had to do with installing a PAE kernel to take advantage of all of my RAM.  This was just a matter of searching for PAE in Synaptic and selecting and installing linux-generic-pae and linux-headers-generic-pae.  But that process failed with, again, some "Failed to fetch" messages.  This time, though, the messages said something about "Got a single header line over 360 chars" and "Bad header line."

So, OK, I was going to have to fix this repository problem before going any further.  I ran a search and came up with Salamane Moustapha's To-Do List After Installing Ubuntu 9.10.  The first thing on his list was to expand the software repository list.  That was actually the very next thing in my own sequence of previous posts, so I went to that one.  It called for installing Ubuntu Tweak, which I had already downloaded, and then running it from Applications > System Tools.  I went down the list in Ubuntu Tweak, making various adjustments.  When I got to the Source Center option, there were no sources listed.  This was no surprise; I had removed all those old ones from Software Sources, and now there was nothing left.  I moved on to the next Ubuntu Tweak item, Source Editor, and here I saw a number of repositories listed.  These seemed to be the ones actually active on my system at this point, as represented by the Ubuntu Software tab in Software Sources.  So far, in other words, Ubuntu Tweak was not solving all of my problems.  The only other things I changed in Ubuntu Tweak at this point were under Default Folder Locations, Manage Scripts, and Nautilus Settings.

Moustapha's To-Do List gave me a large set of repositories.  I was going to follow his instructions and just replace my sources.list with his.  His list was for Ubuntu 9.10, so I figured I would wind up deleting or modifying some from his list.  Then I rediscovered the Ubuntu Sources List Generator, and used that instead.  I didn't select any source code items, and in the Third Parties list I only chose GetDeb, Google Linux Software Repositories, MediaInfo, Medibuntu, Themes, Wine, and X Updates.  There were lots of other interesting programs there, but I thought it might be simpler to just install them via Synaptic as I needed them.  I clicked "Generate List."  Then, in Terminal, I typed "sudo gedit /etc/apt/sources.list."  I deleted its contents and copied their generated list over into it.  I saved and closed that and then copied and pasted, into Terminal, their supplied list of commands to get keys.  The first one, for GetDeb, produced an error:  "gpg: no valid OpenPGP data found."  The solution there was to execute the command with "sudo" in front; so I typed "sudo -i" to eliminate further recurrences of that problem in this session.  The next command provided by the Ubuntu Sources List Generator was "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9D8BC54."  This one produced these errors:
gpgkeys: HTTP fetch error 7:  couldn't connect to host
gpg: no valid OpenPGP data found.
A search for that specific key number (F9D8BC54) turned up nothing.  I skipped that command for the moment and went on to the next.  This one was for Medibuntu.  It gave me five error messages.  One was for medibuntu itself, and it went like this:
W: GPG error: http://packages.medibuntu.org/ lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
The other four were of the same form, but they referred to http://ppa.launchpad.net/ and their public keys were 61260473F9D8BC54 (see above), 6E871C4A881574DE, 5A9A06AEF9CB8DB0, and 3B22AB97AF1CDFA9.  These four (but not the Medibuntu one) repeated again at the end of the installation.  Despite these errors, I ran the next command.  This one referred to key 881574DE, which seeems to have been one of the several just listed.  It seemed that maybe the Ubuntu Sources List Generator had gotten things out of order -- that perhaps I should have run this key request first.  But no, it gave me the same error messages as above, regarding HTTP fetch error 7 and no valid OpenPGP data.  Same thing for the final two commands supplied by the Ubuntu Sources List Generator, regarding keys F9CB8DB0 and AF1CDFA9.  Searches for these led to the suggestion to use this command (inserting, here, the full numbers from above):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EBC26B60C5A2783 61260473F9D8BC54 6E871C4A881574DE 5A9A06AEF9CB8DB0 3B22AB97AF1CDFA9
But this still gave me the "HTTP fetch error 7."  A post from Oscar said that, in his case, the desired repository had been installed nonetheless.  In Software Sources > Authentication tab, I saw that I had keys for GetDeb, Google, and Medibuntu, from those that I had requested, along with Ubuntu Archive, Ubuntu CD Image, and Launchpad PPA, which came first in the list and which, I guessed, had been there before I made this request.  So the Authentication tab was not telling me that the others had been installed.  But Software Sources > Other Software did list them all, so in that sense I did seem to have added them successfully.  I posted a question on this and let the matter sit.  I went back to Update Manager, and this time it ran OK.  I ran it again, but unfortunately this time I got "the public key is not available" error messages for those same items again.  So I had not solved that problem.  I did not proceed further with this effort.  Instead, this and other problems prompted me to reinstall Ubuntu 10.04 from scratch.

Thursday, May 13, 2010

Ubuntu 10.04 Adjustments: Software Source List

I was making some adjustments to my Ubuntu 10.04 (Lucid Lynx) installation.  I got kind of bogged down in the Software Sources.  This post describes that part of the enterprise.

When I went into Software Sources > Other Software, I now had a whole boatload of items, most of which were marked "disabled on upgrade to lucid."  To handle this, I tried Ubuntu Tweak.  It was an easy download, double-click to install.  I went into Applications > System Tools to run it.  Then I went down the list of applications and other items on the left side of its window and selected and adjusted them to taste.  I found that I had to exit Ubuntu Tweak and start it again in order to get the prompt that would re-enable my disabled Software Sources.

In Software Sources > Other Software, I noticed several things that didn't look quite right.  First, the "Cdrom with Ubuntu 9.10 'Karmic Koala'" was unchecked.  This made sense; I wasn't running 9.10 anymore.  I selected that item and clicked Remove.  I thought I'd put the new CD in its place.  I had installed 10.04 via download, not via CD, but in the process of fixing the installation I had downloaded and burned the alternate installation CD.  So now I put that into the CD drive and clicked on Add CD-ROM.  It gave me this:
Upgrade volume detected
A distribution volume with software packages has been detected.
Would you like to try to upgrade from it automatically?
It looked like the answer to that should be no, so I clicked Cancel.  Then I had another error:
Error scanning the CD
E:Unable to locate any package files, perhaps this is not a Debian disc or the wrong architecture?
Apparently the Alternative CD was more different from the ordinary Ubuntu CD than I had realized.  I was curious, so I downloaded and burned the official 10.04 CD.  While that was underway, I went to the next problem item on the Software Sources list:  “Unsupported updates.”  The common advice, repeated on a number of websites that seemed to have copied it from one another, was that this would give me programs that I “probably don’t need or even want.”  Au contraire, I was thinking that a person would enable this kind of source to get access to solutions to new problems as soon as they were discovered.  But for purposes of stability, for now, until I needed them, I decided to go with the flow and leave them unchecked.

Next, I saw that some items were marked as "disabled on upgrade to lucid."  According to TualatriX, Ubuntu Tweak > Applications > Source Center would enable only those that supported Lucid.  I’m not sure what happened to this particular category of problem; I played around with a couple of things and these went away.  Next, some of the titles were not right.  In particular, I saw this:
Medibuntu – Ubuntu 9.10 “karmic koala” (http://packages.medibuntu.org/ lucid free non-free)
I didn’t seem to find advice on exactly this problem, so I just selected that item in Software Sources, clicked Edit, and changed the Comment to “Medibuntu – Ubuntu 10.04 ‘lucid lynx.’”  These tinkerings led me to the revelations that “Mixing repositories can break your system,” and that I should have made a backup of my list of sources before I started fooling around.  The backup, it seemed, could be made with this command:
sudo cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
This made me think that I could work up a good source list once and then not have to start from scratch like this in the future.  I had already modified the sources list in Ubuntu Tweak, but now I thought I might want to start over.  I got out of Software Sources and typed “sudo gedit /etc/apt/sources.list” in Terminal.  I copied the sources.list file suggested in the Ubuntu Guide wiki and used that to replace the contents of sources.list.  The two were pretty much the same anyway, but I thought this might clean things up a bit.  I saved and exited sources.list and went back into Software Sources.  Oddly, it still had some of the items that I had added in Ubuntu Tweak.  I went back into sources.list and, no, those other items (e.g., Skype) had definitely not been added to sources.list when I wasn’t looking.  Evidently Ubuntu Tweak was maintaining its own list of software sources and was using that to supplement whatever was in sources.list.  In Software Sources, I cleaned up the list (added comments, deleted duplicates) and then clicked Close.  It gave me the option to Reload, which I did.  Now I got an error message:
Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems.
This applied to the CD-ROM line I had copied over from the wiki.  I closed that dialog.  The CD ISO was still downloading, so I couldn’t do anything more about that yet.  In the meantime, I went back into Ubuntu Tweak > Source Center > All Categories > Unlock.  Sources that I had selected previously were still checked, so UT did seem to be saving its own list somewhere.  I refreshed, got the CD-ROM error message again, closed that, installed new applications implied by my selection of sources, and then exited.  Trying another approach, I went to the Ubuntu Sources List Generator and selected all of the repositories I would want.  I excluded source code repositories, since I did not plan to be working with source code.  I clicked “Generate List.”  It gave me a replacement sources.list file, plus a list of commands to run to get the keys necessary to make the sources work; but it also looked like those commands were listed in the comments in the sources.list file too.  I looked again at Ubuntu Tweak.  It had a much longer list of sources, but I thought I could probably do without some.  In particular, I didn’t know if I needed a source just for some individual programs.  One, "déjà vu dup," was supposed to be a simple backup utility.  It was listed in Synaptic and would presumably be updated through there.  I hadn’t used it before, but I thought I would give it a try.  Likewise for Firefox, Opera, Shutter, deluge-torrent, and others.  The list generated by Ubuntu Sources List Generator did include Google, Medibuntu, and other major sources.  So I unchecked all of the sources in Ubuntu Tweak, including the Ubuntu Tweak source itself.  Then I took another look at sources.list, in the form I had copied from the wiki.  It was much more verbose than the one generated by the Ubuntu Sources List Generator, and now that I understood more about it, I didn’t want all those extra comments.  In the end, I decided that all I needed from the sources.list file that I had copied from the wiki was the first line, referring to the Ubuntu 10.04 CD-ROM.  So I replaced the existing sources.list with this one, provided by the List Generator:

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

##############################################################
##################### UNOFFICIAL  REPOS ######################
##############################################################

###### 3rd Party Binary Repos

#### GetDeb - http://www.getdeb.net
## Run this command: wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
deb http://archive.getdeb.net/ubuntu lucid-getdeb apps

#### Google Linux Software Repositories - http://www.google.com/linuxrepositories/index.html
## Run this command: wget -q https://dl-ssl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
deb http://dl.google.com/linux/deb/ stable non-free

#### HandBrake - http://handbrake.fr/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 62D38753
deb http://ppa.launchpad.net/handbrake-ubuntu/ppa/ubuntu lucid main 

#### Medibuntu - http://www.medibuntu.org/ 
## Run this command: sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update 
deb http://packages.medibuntu.org/ lucid free non-free 

#### Mendeley Desktop - http://www.mendeley.com/
## Run this command: no gpg keys supplied
deb http://www.mendeley.com/repositories/xUbuntu_10.04 /

#### muCommander - http://www.mucommander.com/
## Run this command: sudo wget -O - http://apt.mucommander.com/apt.key | sudo apt-key add - 
deb http://apt.mucommander.com stable main non-free contrib  

#### Ubuntu Tweak - http://ubuntu-tweak.com/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0624A220
deb http://ppa.launchpad.net/tualatrix/ubuntu lucid main

#### Wine - https://launchpad.net/~ubuntu-wine/+archive/ppa/
## Run this command:  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9CB8DB0
deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu lucid main

#### X Updates - https://launchpad.net/~ubuntu-x-swat/+archive/x-updates/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AF1CDFA9
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu lucid main 

With that as my new sources.list file, I went back into Software Sources.  The entries that had been added previously were still there, along with the new ones listed in my new sources.list file.  I deleted the old ones and closed.  It asked if it should reload, and I said yes.  It said, "Could not download all repository indexes," because I had not yet entered the commands shown in the sources.list (above).  So I entered them, one at a time.  Some just gave me OK; some gave me other messages and then OK; some seemed to have problems.  I went to System > Administration > Update Manager and updated programs.    When it was done, I clicked the Check button.  It again said "Could not download all repository indexes" and "Please use apt-cdrom to make this CD-ROM recognized by APT."  It also said, "Some index files failed to download, they have been ignored, or old ones used instead."  For the CD-ROM, I went into System > Administration > Software Sources > Other Software and clicked the Add CD-ROM button.  I inserted the CD.  It said, "A volume with software packages has been detected."  I didn't want to install anything from the CD-ROM now, so I canceled out of that.  When I clicked Close, I was again given an opportunity to Reload, which I took.  I clicked Check again in Update Manager.  That was apparently the only thing I had needed to fix; there were no errors now.  Back in Software Sources, I saw that I had two entries for the CD-ROM.  I looked again at sources.list.  It had added a duplicate of the CD-ROM line, but it put it as the very first line, not lower down under the "OFFICIAL UBUNTU REPOS" heading as shown above.  So I deleted the one (under that heading), saved sources.list, and took another look in Software Sources.  There was now just one CD-ROM.  I made a trivial change and tried to close; I took the Reload option; all was good.  I saved a copy of the revised sources.list file, for use in this or other computers.  It was time to return to the main project of updating Ubuntu 10.04.