Tagged and Bagged: , , ,

Have you had a problem with an application that you got from outside the approved Ubuntu mirrors? Did it refuse to run? Did you know that you can execute a program from a command prompt by typing its name and hitting ENTER? Did you know that most programs will give you extra info via the -v (verbose) switch?

I have recently had that problem with a rss aggregator named PenguinTV. Its nice and simple and will grab just about any audio or video feed, like Miro, without the heavy system requirements (it uses the default apps to play the media, for example, instead of handling that itself). Its ideal for podcast fetching. The problem is that the version that is available in the software showcase does not work without telling the program some things that it should figure out itself. I tried the solution on the forum post about the same problem that I’d encountered of trying to get the latest .deb from the project’s home page. However, I was getting a “bad syntax” error.

This is because Ubuntu has switched from bash as its default shell to dash (lighter and faster, closer to the original ash shell). On nearly every distribution of GNU/Linux, /bin/sh is a symbolic link to /bin/bash, so nearly all executable scripts in /usr/bin will begin with the shebang #!/bin/sh. With /usr/bin/PenguinTV, open it up with a text editor as root and change the shebang to #!/bin/bash and it will run, as the developer is using bash!

…now if I can only find out why it sometimes core dumps…(I just found gPodder, which might be the ultimate solution)

5 Comments

  1. od says:

    Same issue with WebSphere installation.

    http://sixtydoses.wordpress.com/2008/03/14/install-was-basend-v610-on-ubuntu-gutsy/

    1
  2. hari says:

    Another reason could be that the .deb was built on a different architecture e.g. if you’re trying to install a i386 binary on an AMD64 machine. But in that case it should even refuse to install.

    2
  3. MrCorey says:

    I’ve had that happen with a codec pack. It was built for x64 and refused to install. Perhaps I’ll just install NetBSD and use ash!

    3
  4. Joe says:

    I have some scripts that were built originally on Mandrake 9.1 using #!/bin/sh .

    Recently, (I think when I switched from dapper to feisty), they all started failing on a syntax error.

    I changed them to #!/bin/bash and they miraculously started working again. Haven’t researched why.

    4
  5. mrcorey says:

    Thanks for your input, Joe. I think that you’ll find that the reason why its crapping out on you now is because /bin/sh is symlinked to /bin/dash.

    5

Leave a Reply

TopOfBlogs