Category Archives: ubuntu

Installing PIL in virtualenv in Ubuntu

To install PIL in virtualenv in ubuntu, these are the steps:

  1. install the dependencies needed to build PIL

    sudo apt-get build-dep python-imaging
  2. then run these commands

    sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/
    sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/
    sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/

    If you’re using 64bit system, switch i386-linux-gnu to x86_64-linux-gnu.

    If you don’t do it, you might see these messages when after building PIL, and you won’t have jpeg support.

    *** JPEG support not available
    *** ZLIB (PNG/ZIP) support not available
    *** FREETYPE2 support not available
  3. Last command, install PIL

    pip install PIL

Ubuntu 11.04 (Natty Narwhal) Daily Build

It’s available, ubuntu 11.04 daily build. No it’s not released yet. It’s the development build. If feel like to help ubuntu development, you could try it.

According to the release schedule, the first alpha will be released on December 2nd, and the final release will be available on April 28th.

Tagged , , ,

Enable PHP in Apache userdir in Lucid Lynx (Ubuntu 10.04)

If you’re using php + apache in Lucid Lynx (Ubuntu 10.04), you’ll notice that the php is disabled when you’re using userdir module (http://localhost/~yourusername). To enable it, open /etc/apache2/mods-enabled/php5.conf (alt+F2, then type gksudo gedit /etc/apache2/mods-enabled/php5.conf) and comment this part (add ‘#’ character in every line):

        php_admin_value engine Off

The result should be like this:

#        php_admin_value engine Off

Save the file, then restart the apache by typing sudo /etc/init.d/apache2 restart in terminal.

(taken from

Tagged , , , ,

Convert pdf to image

Ever want to convert pdf file to an image? Itโ€™s easy with imagemagick. Ubuntu default installation has it. I believe itโ€™s installed in most linux distribution by default. Anyway, hereโ€™s how:

convert file.pdf file.jpg
convert file.pdf file.png

Yeah. That easy.

Tagged , , , ,

An Error Occurred During The Signature Verification

If you’re using ubuntu as your choice of linux distribution, and you like to add some unofficial repositories, you probably find some warnings when you run apt-get update command.

The warnings are probably like this

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991

W: Failed to fetch  

W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems

That’s the warnings I got when I added google debian repository. There won’t be anything bad about it, since we could still install the packages from that repositories. But, I we could get rid the warnings, that’s would be a lot better. We could use gpg command to get the key.

Short Version

For you who don’t want to read pointless explanations below, here’s the short version

gpg --keyserver hkp:// --recv-keys A040830F7FAC5991
gpg --export --armor 7FAC5991 | sudo apt-key add -

Long Version

Here’s the explained step. First we have to get the key from the key server.

gpg --keyserver hkp:// --recv-keys A040830F7FAC5991

The A040830F7FAC5991 is from the warning shown before. You might want to change it if you have different repository. For the google repository, you should get this as the output

gpg: requesting key 7FAC5991 from hkp server
gpg: key 7FAC5991: public key "Google, Inc. Linux Package Signing Key " imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Total number processed: 1
gpg:               imported: 1

After that, type

gpg --export --armor 7FAC5991 | sudo apt-key add -

Where the 7FAC5991 is from the output shown before.

After that you’ll get OK as the output. You may run apt-get update again.

Oh, one more thing, I only tested this method in opera and google repositories ๐Ÿ™‚

Tagged , ,

Banshee 1.0 Beta 2 in Ubuntu 8.04 Hardy Heron

Now Banshee 1.0 Beta 2 is released. If you want to try the music player in your ubuntu hardy box, you could add sources.list entry from banshee PPA team.

Open software sources (System > Administration > Software Sources). In Third-Party Software tab, click Add and paste the code below

deb hardy main

If you need the source, you could repeat the Add proccess, and paste this

deb-src hardy main

Close the Software Sources. Wait for a few moment while the software update your package database. Then open the terminal, and type

sudo apt-get install banshee-1

Yes, use banshee-1. If you use banshee, you’ll get the old Banshee 0.13.2 from universe repository.

And, enjoy your new Banshee ๐Ÿ™‚

Tagged , , , , , ,

Check Your System Compiz Capability

There is a great script created to check whether your system is compiz ready or not. It’s called Compiz-Check.

Gathering information about your system...

 Distribution:          Ubuntu 8.04
 Desktop environment:   GNOME
 Graphics chip:         nVidia Corporation G70 [GeForce 7300 GT] (rev a1)
 Driver in use:         nvidia
 Rendering method:      Nvidia

Checking if it's possible to run Compiz on your system...

 Checking for texture_from_pixmap...               [ OK ]
 Checking for non power of two support...          [ OK ]
 Checking for composite extension...               [ OK ]
 Checking for FBConfig...                          [ OK ]

Checking for hardware/setup problems...            [ OK ]

If you got [ OK ] in every check, like mine, then your system is ready to run compiz. If something fails, go check the forum ๐Ÿ˜€

Tagged , ,

How To Install Oracle XE in Ubuntu 64 Bit

While you’re thinking by installing 64 bit linux you’re standing in the edge of new technology era, it sucks knowing our 64 bit system is less supported than the old 32 bit system. We have to install 32 bit flash since Adobe didn’t have the 64 bit one. We have to install 32 bit oracle xe since Oracle also didn’t have 64 bit version.

And now I will try explain how to install oracle xe into the 64 bit system, ubuntu way. Of course we couldn’t follow the guide from oracle, since apt-get will detect our system architecture and we won’t get the 32 bit packages list.

Before we start, make sure you have the 32 bit library installed. It’s in reposity, all you have to do is

sudo apt-get install libc6-i386

The next thing to do is download the files needed. It’s libaio_0.3.104-1_i386.deb and oracle-xe-universal_10.2.0.1-1.1_i386.deb. You could use wget for this

wget -c

After your downloads are finished, we continue to the main issue, forcing the package to be installed. You could try to install with usual dpkg -i first to make sure your system is really 64 bit.

sudo dpkg -i libaio_0.3.104-1_i386.deb

You’ll get error,

dpkg: error processing libaio_0.3.104-1_i386.deb (--install):
package architecture (i386) does not match system (amd64)
Errors were encountered while processing:

Added guide from Venka A

sudo apt-get install bc

To force the installation, do these

dpkg -i --force-architecture libaio_0.3.104-1_i386.deb
dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb

And after the installation is finished, you need to configure it

sudo /etc/init.d/oracle-xe configure

and edit your ~/.bashrc

export PATH

And, voila, the oracle xe is ready. You could go to from your browser.


Tagged ,