RU-FI-OOOOOH!

Sohail Mirza, standing in for Peter.

Archive for the ‘Software’ Category

dpkg problems relating to ‘cups’ in Ubuntu

with 2 comments

Firefox 3.0.5, Mozilla’s latest security fix for the venerable browser has recently been released.  Tonight it was pushed out to Ubuntu 8.10 users, and so I promptly updated my Ubuntu installation.  Noticing that there were other updates as well, I applied them all.

Unfortunately, dpkg wasn’t able to complete the update of all selected packages.  I wanted to review the problem, so from the command-line I brought up aptitude via:

sudo aptitude

Aptitude was nice enough to let me know that I needed to run the following command to correct the problem:

sudo dpkg --configure -a

… unfortunately it didn’t work:

$ sudo dpkg --configure -a
dpkg: ../../src/packages.c:221: process_queue: Assertion `dependtry <= 4' failed.
Aborted

I decided to go back into aptitude to see if any packages would be selected there for installation due to a failure to install previously.  Sure enough, when I pressed ‘g’ to process all actions, it attempted to install cups, cups-bsd, and cups-client, but failed:

dpkg: error processing cups (--configure):
package cups is not ready for configuration
cannot configure (current status `triggers-awaited')
dpkg: error processing cups-client (--configure):
package cups-client is not ready for configuration
cannot configure (current status `triggers-awaited')
dpkg: ../../src/packages.c:221: process_queue: Assertion `dependtry <= 4' failed.
E: Sub-process /usr/bin/dpkg exited unexpectedly
A package failed to install.  Trying to recover:
dpkg: ../../src/packages.c:221: process_queue: Assertion `dependtry <= 4' failed.
Aborted

These were the packages that had failed to install successfully earlier.

What could I do to get around this?  Aptitude wasn’t able to handle it for me, and nor could dpkg process the configuration of these packages.  After some futzing around, I even tried downgrading the packages in aptitude, but the same dpkg errors came up:

Preconfiguring packages ...
Selecting previously deselected package cups.
(Reading database ... 148514 files and directories currently installed.)
Preparing to replace cups 1.3.9-2ubuntu4 (using .../cups_1.3.9-2_amd64.deb) ...
* Stopping Common Unix Printing System: cupsd [ OK ]
Unpacking replacement cups ...
Selecting previously deselected package cups-bsd.
Preparing to replace cups-bsd 1.3.9-2ubuntu4 (using .../cups-bsd_1.3.9-2_amd64.deb) ...
Unpacking replacement cups-bsd ...
Selecting previously deselected package cups-client.
Preparing to replace cups-client 1.3.9-2ubuntu4 (using .../cups-client_1.3.9-2_amd64.deb) ...
Unpacking replacement cups-client ...
Processing triggers for doc-base ...
Processing 1 changed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Processing triggers for ufw ...
ERROR: Couldn't stat '/etc/default/ufw'
dpkg: subprocess post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install. Trying to recover:
Setting up cups-client (1.3.9-2) ...

Setting up ufw (0.23.2) ...

Setting up cups (1.3.9-2) ...

Installing new version of config file /etc/apparmor.d/usr.sbin.cupsd ...
Reloading AppArmor profiles : done.
* Starting Common Unix Printing System: cupsd [ OK ]

dpkg: ../../src/packages.c:221: process_queue: Assertion `dependtry <= 4' failed.
Aborted
Press return to continue.

But wait, what’s that error?

Processing triggers for ufw ...
ERROR: Couldn't stat '/etc/default/ufw'
dpkg: subprocess post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)

A-hah!  It looked like the cups installation needed to process some triggers for the package ufw, and this failed.  ufw is Uncomplicated FireWall package for Ubuntu, but it’s a package I’m not using.

So, maybe if I were to uninstall ufw, the cups packages would successfully install?

sudo aptitude purge ufw

If you want to keep the ufw configuration files, you can try this instead:

sudo aptitude remove ufw

Removing ufw may display some cups errors, but ufw should still successfully uninstall.

At this point, the resolution that aptitude first suggested worked as well:

sudo dpkg --configure -a

And now to install the latest version of cups instead of the downgraded versions I attempted to install.

Preconfiguring packages ...
(Reading database ... 148481 files and directories currently installed.)
Preparing to replace cups 1.3.9-2 (using .../cups_1.3.9-2ubuntu4_amd64.deb) ...
* Stopping Common Unix Printing System: cupsd                                                                                                                                                                                        [ OK ]
Unpacking replacement cups ...
Preparing to replace cups-bsd 1.3.9-2 (using .../cups-bsd_1.3.9-2ubuntu4_amd64.deb) ...
Unpacking replacement cups-bsd ...
Preparing to replace cups-client 1.3.9-2 (using .../cups-client_1.3.9-2ubuntu4_amd64.deb) ...
Unpacking replacement cups-client ...
Processing triggers for doc-base ...
Processing 1 changed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up cups (1.3.9-2ubuntu4) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.cupsd ...
Reloading AppArmor profiles : done.
* Starting Common Unix Printing System: cupsd                                                                                                                                                                                        [ OK ]

Setting up cups-client (1.3.9-2ubuntu4) ...

Setting up cups-bsd (1.3.9-2ubuntu4) ...

Press return to continue.

Presto! It worked!

At this point I reinstalled ufw and all was as it should be.

Along the way I was also able to find a cool way of listing packages on one’s system that are not completely installed.  From a command line terminal, you can enter the following:

sudo dpkg -l | grep -v ^ii

The first portion of this command, sudo dpkg -l, will list all the packages on your system. The second portion, grep -v ^ii, says, ‘search through that list of packages for any line that does not start with “ii“‘. The letters “ii” at the beginning of a line of the package listing indicates the package is successfully installed.

Quite an eventful application of system updates! I love Ubuntu for its simplicity, and the fact that upgrades and installations are usually hassle-free. But, even when there’s a problem, the power inherent in Linux allows you to quickly and effectively resolve the issue.

NB: Sorry about the poor formatting of this post, WordPress is simply not co-operating.

Written by Sohail Mirza

December 18, 2008 at 1:10 am

Posted in Software, Ubuntu

Tagged with , , , , ,

Assembly ’07 just around the corner

with 2 comments

Well, Assembly sure has changed since back in the day.

Assembly ‘03 in Helsinki (Thumbnail)

In 1994, our family bought our first computer. It was a way-too-expensive IBM Aptiva with a Pentium 60Mhz CPU, which was mind-blowing for the time. The very first Pentium-class CPU! At the time I was very interested in computer graphics and other such geekery, and I had convinced my mum to buy that monster of a system so that I could experiment in 3d graphics design and computer animation, which were only budding industries at the time.

A friend at school eventually turned me onto the demo scene. I was captivated from the very beginning. To me, the demo scene represented a melding of art and mechanics. The demo creators pieced together complex visuals with what are nearly the most basic building blocks of modern computing (assembly instructions). The sheer skill required was enough to impress, but I was totally drawn in by the amazing mod soundtracks and graphical prowess on display.

Future CrewSo, for a few years during the mid-90′s I followed the annual scene releases and would always download the top few demos of that year. I grew up on the Future Crew and other well-knowns in the scene.

By the late 90′s though I had fallen out of the scene. My computer had aged into obsolescence and wasn’t very capable at running the newer demos. As well, most of the groups I had first heard of had since left the scene. The demos of this time just didn’t capture my interest as much. The late 90′s also saw the beginnings of the PC as a 3d gaming system, thanks to DirectX and OpenGL. This made the demos being produced at the time seem less and less impressive relative to the games that were cropping up, at least visually.

Throughout that time and the first half of this decade, I did look up the Assembly scene to see how was doing, once in a while vainly attempting to download and run a demo, but very few worked well.

Well, today I looked up the website at assembly.org and was quite surprised to find the site had meta-morphed into what looks like a thriving community for the demo scene. I suppose the demo scene never really died, and I’m not sure if the scene as a whole slumped or not, but it certainly seemed it to me. Anyways I was pretty impressed with the site, which I think only a year or two back was a simple repository for announcing the new shows and hosting the show submissions.

It was also nice to see that Assembly ’07, this year’s incarnation of the annual meet is to take place in only 2 days.

This year I’ll plan to check out the shows submissions. Let’s see if I can’t re-ignite the captivation and awe at the skill of some of the demo-coders.

Written by Sohail Mirza

July 31, 2007 at 1:56 am

Posted in Design, Personal, Software

Helpful Hints – Downloading HD Trailers from Apple Trailers

with 6 comments

Quicktime LogoEver been perusing the Apple Trailers website, checking out the HD trailers, and been annoyed by the process of buffering and watching the streaming video? Wouldn’t it just be better to download the video to your desktop and watch it at your own convenience, without having to buffer the video?

Well, there are a couple of ways to do this.

Read the rest of this entry »

Written by Sohail Mirza

July 15, 2007 at 5:35 pm

John Resig on JavaScript as a Language

leave a comment »

White RhinocerosNow, this is really cool. John Resig (who, by the way, also happens to have one of the coolest blog layouts I’ve seen) of Mozilla talks about how JavaScript is evolving into a full-fledged programming language. Especially interesting are the JavaScript on Rails and Helma efforts, both efforts to create full-featured web application frameworks on top of JavaScript.

It’s Mozilla’s Rhino that’s making this possible with its implementation of JavaScript that runs in the JVM. This has significant performance benefits. Could it possibly lead to JavaScript on Rails being a better solution than Ruby on Rails, at least performance-wise?

John comments:

A good deal of energy has been put into worrying about JavaScript performance. This is a great sign. It’s sort of a natural progression for a language (worry about implementation, then standardization and compliance, and finally speed).

Read on: http://ejohn.org/blog/javascript-as-a-language/

Written by Sohail Mirza

July 10, 2007 at 12:14 pm

Visio’s “Template Help” is getting annoying

with 41 comments

I’ve just discovered how to turn off the “Template Help” task pane in Visio 2003. Good grief, what an annoying feature that task pane is!

Every time I started Visio, I was being presented with the “Template Help” task pane. It’s an annoying sidebar that sits on the right-hand side of Visio and offers links to online resources for developing Visio templates.

Sounds useful, except that I have no interest in templates. My guess would be that most Visio users have no need for the nagging help bar. Even worse is that it takes up a God-awful amount of screen real-estate so every time I open Visio I have to close the task pane.

Read the rest of this entry »

Written by Sohail Mirza

March 13, 2007 at 7:03 pm

Posted in Software

Terragen 2 Cometh

leave a comment »

So, the Terragen 2 technology preview is finally upon us. This application has been literally years in the making. I remember reading about it ages ago. Unfortunately it’s only available for Mac OS X (> 10.4) and Windows.

Say what, no Linux support? I find that odd considering that most of the players in the field of 3d modeling and visualization support the Linux platform to some extent. Of course, I say this without having tried any of their offerings in Linux. I think of 3d modeling applications as just an OS-specific toolkit on top of the rendering engine, which should theoretically be platform neutral, right? Rendering to the screen, given that the application supports OS X, is likely being performed via OpenGL.

So I wonder, why no Linux support?

In any case, if you’re on Windows or OS X, check it out and feel free to let me know how you find it! I just love the sample imagery produced by this application. Drop-dead gorgeous. Of course, I love the notice at the top of the gallery pages:

For the best viewing experience, please set your monitor to TrueColour/millions of colours.

When was the last time you met someone still running at 8-bit or 16-bit colour?

In conclusion, go grab Terragen 2.

Written by Sohail Mirza

February 12, 2007 at 9:44 pm

Posted in Software

Picasa, All Sorts of Photo Management Goodness

leave a comment »

Picasa + HelloA few days back on Lifehacker, a tip on organizing your photos using a crude system of folders and shortcuts to emulate tagging appeared.

As far as I’m concerned, Picasa is simply unbeatable for photo management. The latest Windows version allows you to view by folder hierarchy or by the default Picasa album view (chronological order).

My biggest wish is that Picasa support a distinction between your photo library and albums of select photos that you can create yourself (somewhat akin to the way iPhoto works, although I found iPhoto too difficult to understand and get working for me).

My biggest complaint is that Picasa on Linux isn’t up-to-date. Being a product of Google Labs, the Linux version lacks Picasa Web Album and Hello integration, as well as the nifty folder hierarchy view.

It’s rather unfortunate that Hello isn’t available on Linux, and thus Linux users are unable to experience the amazing integration between Picasa and Hello. I have been able to install Hello using Wine, but the integration of the two products isn’t there.

Written by Sohail Mirza

January 18, 2007 at 2:17 am

Posted in Google, Software

Follow

Get every new post delivered to your Inbox.