Showing posts with label synaptic package manager. Show all posts
Showing posts with label synaptic package manager. Show all posts

Wednesday, September 8, 2010

Ubuntu 10.04: Repositories

In the process of reinstalling Ubuntu 10.04, it came time to install my software sources (i.e., repositories).  To start off, I visited my most recent post on that.  It told a tale of difficulty in getting my list of "repos" to work, and referred me to one of my earlier posts.

I decided to start by simply copying the finalized list of repos that I had developed and posted in that earlier note.  This replaced my existing /etc/apt/sources.list.  I wasn't sure if I needed to reboot, but having done all those updates and such, I decided it couldn't hurt.  On reboot, I went into System > Administration > Software Sources to see what we had.  There were some items on the list that had to do with individual programs.  I found another such list that was even longer.  I wasn't sure why I needed repositories for individual programs; I was under the impression that repositories were places where you could get a variety of programs.  So rather than add to the list (and increase the number of repositories that might report problems later on, as I had experienced previously), I pared down the list.  My final list, preserved in a backup copy of /etc/apt/sources.list, was as follows:

http://archive.canonical.com/ubuntu lucid partner
http://archive.canonical.com/ubuntu lucid partner (Source Code)
http://archive.getdeb.net/ubuntu lucid-getdeb apps
http://packages.medibuntu.org/ lucid free non-free
http://ppa.launchpad.net/tualatrix/ubuntu lucid main
http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu lucid main
http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu lucid main

I clicked Close.  It gave me a chance to Reload, which I took.  It said this:

Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems ...
I closed out of that and typed "sudo gedit /etc/apt/sources.list."  Sources.list still had some lines for repositories that I had deleted, so I deleted those surplus lines.  It also had commands I should run in connection with the rest, so I copied those lines into a separate file in gedit, saved it as RunForRepositories, made it executable ("sudo chmod +x RunForRepositories"), saved a copy for future use, and then ran it ("sh RunForRepositories).  I went back into Software Sources, changed one thing, closed, reloaded, and got the "Could not download all repository indexes" error again.  At this point, I rediscovered that you could add repositories via System > Administration > Synaptic Package Manager.  In Synaptic, I went to Settings > Repositories.  But this turned out to be the same thing as the Software Sources tool.  In Software Sources > Other Software, I unclicked and then reclicked an item to trigger the Close > Reload option.  Once again, I got the "Could not download all repository indexes" error.  The first item on the list was the Medibuntu repository, with this message:  "The following signatures could not be verified because the public key is not available."  Following advice, I closed out of that, went into Synaptic, searched for medibuntu-keyring, and applied that.  In Synaptic, I went again into Settings > Repositories and retriggered the Reload.  But it didn't work -- no Reload option -- so I did it via System > Administration > Software Sources.  This time the Medibuntu error was gone, and the first error in the list had to do with the Ubuntu CD.  I decided I didn't want the Ubuntu CD to be a source, so in Software Sources I unchecked the CD on the Ubuntu Software tab, and then retriggered the Reload option again.  No more errors.

For some reason, /etc/apt/sources.list did not show some of these changes.  Maybe I had it open in a separate window while I ws going through my paces.  So I edited it manually to reflect my current preference and resaved a copy on a separate partition.  Now that this was done, I ran System > Administration > Update Manager and installed the new updates they had for me there.  I clicked Check to repeat that step.  It said my system was up-to-date.  I concluded that the repository step was done.

Monday, January 18, 2010

Configuring 64-Bit Ubuntu 9.10 (Karmic Koala)

In a previous post, I described the steps I followed in setting up x64 Ubuntu 9.04 (as refined in a later post).  This post does the same for Ubuntu 9.10.  I won't re-describe steps that are already spelled out in some detail in that previous post and in the other webpages to which it refers.  I'll still provide most of the details here, just not as much in-depth explanation.

Deciding on a Clean Install.  I was installing on a machine where I had previously been running 9.04.  I installed 9.04 on top of 8.10 on that machine, and this seemed to lead to some unusual problems -- you know, the kind of issue that brings up almost nothing in a Google search.  The better approach was apparently to do a clean install.  So now it was time to do that, replacing 9.04 with 9.10.

My first question was, what should I preserve from my previous setup, and how can I preserve it?  One suggestion was to try this:

tar cf /media/[backup drive]/[backup folder]/[backup filename].tar /etc /home
That didn't work for me, as my /home directory contained 32GB.  Another post in that same thread suggested installing your stuff to a separate /home partition, so that your settings wouldn't be wiped out by future clean installations.  I found a guide to moving the /home partition.  I started to use GParted to make a 50GB /home partition.  I chose ext3 because ext4 still seemed to have some issues.  I discovered that Ubuntu's manual installer has an option not to format the partition you're installing to, so as to preserve your old settings.  I decided against both of these approaches because I did want to wipe out my old /home partition, with its mistakes and assorted junk.  So I installed Ubuntu as described in the previous post, working from a CD.  I went into System > Administration > Update Manager > Check.  This gave me 184 updates and a reboot.

Software Sources.  Next, I went into Applications > Ubuntu Software Center > Get Free Software > search for "restricted extras" > select Ubuntu restricted extras > Install.  Next, System > Administration > Hardware Drivers > NVIDIA accelerated graphics driver (version 185) (because I had an NVIDIA video card) > Activate > Close.  Next, System > Administration > Software Sources > Ubuntu Software tab > Download From > Other > Select Best Server > Choose Server (whichever one it highlights) > Close.  Also, in Software Sources, go to the Other Software tab, select the two entries that are already there, and click Add to add more.  The additional lines come from the X-Updates website.  There, click on "Technical details about this PPA," specify Karmic, and copy the two deb lines there, one at a time, into the APT line, clicking "Add Source" after each.  Next, on that same webpage, follow the Signing Key instructions, just below the deb lines.  Click Close.  This will bring up "The information about available software is out-of-date."  Click Reload.  If you don't get a "Reload" option when you click Close, go back into Third-Party Software and unclick and then re-click some item and try again.

Synaptic.  I had read an upgrade tip that said I could automatically reinstall my installed Synaptic applications by using System > Administration Synaptic Package Manager > File > Save Markings As > Save full state and then, after the upgrade, use Synaptic > File > Read Markings.  I had saved as advised; now I tried the read (restore) step.  It did not work well for me.  After this and a few more misadventures, I wound up reinstalling Ubuntu from scratch.  For posterity, the next few paragraphs describe the failed approach.  After that, I describe the alternate approach, the one that I had used in previous installations. 


To try the Read Markings approach, I started by going to Places > Computer and double-clicking on the drive where I had saved the backup.  Then Apply.  But that gave me an error:  "Could not apply changes!  Fix broken packages first."  So I went into Synaptic > Edit > Fix broken packages.  That, in turn, generated this message:  "An error occurred.  The following details are provided:  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."  Adapting some older advice, I closed Synaptic and then typed this:

sudo -i
apt-get clean
apt-get autoclean
apt-get update
apt-get upgrade
apt-get dist-upgrade

Now I tried Synaptic again.  The steps just taken did not seem to change anything; but after tinkering with the same options, Edit > Fix broken packages seemed to work, and Apply proceeded to download 259 files.  Since the more automated Markings approach seemed to work, the advice for the next installation would be to uninstall any unwanted packages before running the Save Markings step.

Instead of all that, on the second installation I selected and installed these packages from within Synaptic:  boinc; boinc-manager; fdutils (if you expect to be using a floppy drive); gparted; ntfs-config; ntfsprogs; p7zip-full; sysinfo; and webhttrack. (If numerous items come up in response to your search, click on the Package heading to sort them alphabetically. Also install other related packages, if given the option.) (If some of my later descriptions don't work for you, it may be because you didn't install one of these.)  For my e-mail, I preferred thunderbird, so I added that, and uninstalled evolution.  Some of these may ask if you want to "Mark additional required changes?" Click "Mark" and go on to the next one. Then click Apply. Some of these programs may already be shown as being installed on your system. If so, no problem.

Other Programs.  To install Google Earth, I didn't use a previous download (see above). Instead, I typed these two lines:  First, "wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin," and then "sh GoogleEarthLinux.bin" (as always, without quotation marks).

I didn't have to install Firefox -- it came installed with Karmic -- but, as in the past, I hoped to speed up my customization by using the FEBE add-in.  I had made a FEBE backup before this reinstallation.  Now, to restore my previous settings, I installed FEBE.  Unfortunately, Firefox did not seem to be functioning properly. I address this set of problems in a separate post.  (I think the problem may have been that I tried to use a FEBE backup of a Windows XP Firefox installation.  Firefox on Ubuntu does not use the same add-ons.)  To have a browser, I downloaded 64-bit Opera.  (At this point, 64-bit Google Chrome was apparently unstable.)  Opera came as a .deb file, so I just double-clicked to install it.  On the reinstall, I didn't even bother with FEBE at this point; for the time being, I just used Opera in its basic form.

VMware Workstation 7 came as a .bundle file, which required the same installation steps as .bin files.  First, I typed "chmod +x" [filename] and then "./"[filename]. I designated "/home/[username]" as the installation directory.  (In all cases, fill in the bracketed names with your actual names.)

I didn't have any .tar files to install at this point.  If I had, my notes said I should have used tar -vxf filename.tar.gz (or possibly tar xvfz instead), tar xvf filename.tar, and tar yxf filename.tar.bz2.

Drive Automount.  I wanted some partitions to be mounted automatically at startup.  In the past, I had manually edited /etc/fstab to do this.  This time, I decided to try PySDM, which was apparently short for Python Storage Device Manager (System > Administration > Storage Device Manager).  Unfortunately, my efforts suggested there were serious bugs in PySDM, so I uninstalled it and edited fstab manually.  I began by typing "sudo ntfs-config" and then "sudo gedit /etc/fstab."  I also ran System > Administration > GParted for a GUI reference, to help me see what I was supposed to be doing.  I plugged in all of my USB drives, typed "sudo blkid" to get the universal identifier (UUID) for each partition, and copied and pasted that into fstab.  I refreshed GParted (Ctrl-R) and created a comment line for each partition shown in GParted.  This was about the point when things seemed so grotesquely screwed up (because of PySDM, it seemed) as to warrant a complete reinstallation.  When I rebooted, it looked like everything was getting automatically booted without a problem.  I saved a copy of my resulting fstab in case I had to reinstall again.  I noticed that the booted partitions were all represented by icons on the desktop.  I wanted to remove those, so I typed "gconf-editor" and went into apps/nautilus/desktop, unnclicked volumes_visible, and closed the Configuration Editor, and the icons were gone.



Miscellany.  Ubuntu 9.10 used Grub2, which no longer used menu.lst.  I heard it was no longer possible to edit the Grub menu to remove entries for older kernels; instead, you had to remove the whole kernel, and then the menu entry would go away too.  ||  In System > Preferences > Startup Applications, I added Thunderbird, Firefox, and VMware Workstation.

The next steps are going to be to restore my Thunderbird profile backup and finish the automation of the rsync scripts I have been playing with for some months now.  But those steps will have to come later.