Installing Python 3.0 on Ubuntu 8.10 Intrepid Ibex

UPDATE (Dec, 7): apt-get install python3 works now. this might be the prefered way for most of us.

Based on sofen’s blog’s post about python 2.6

This was the easiest thing I did recently. It went so smooth that this post is totally redundant.

Seven commands and you are all unicode.

Step 1: Make sure you got all the prerequisites

$ sudo apt-get install build-essential libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libbz2-dev libc6-dev libsqlite3-dev tk-dev g++ gcc

Step 2: Grab the bits, extract them and build them

$ wget http://www.python.org/ftp/python/3.0/Python-3.0.tgz
$ tar xvzf Python-3.0.tgz
$ cd Python-3.0/
$ ./configure
$ make
$ sudo make install

That’s it my friend. You now have the best software development platform in the entire universe!

$ python3.0
Python 3.0 (r30:67503, Dec  4 2008, 21:27:40)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Good luck and enjoy the sweetness of open source software!


sub-process usr/bin/dpkg returned an error code (2)

I came across this annoying message and couldn’t get around it (running dpkg --configure -a  yields EOF related error message)  until I ran dpkg --clear-avail


How to install Infogami (+ PostgreSQL 8.2) on Ubuntu Gutsy Gibbon (7.10)

Step 1: PostgreSQL (8.2)

Installing postgresql (8.2)

sudo apt-get install postgresql-8.2

Setting up the password for postgres’ postgres user

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'your-password';
\q

Configure postgres’ authentication method :

sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak
sudo nano /etc/postgresql/8.2/main/pg_hba.conf

Add the following at the bottom of the file

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all         127.0.0.1       255.255.255.0    password

Restart postgres:

sudo /etc/init.d/postgresql-8.2 restart

Step 2: Infogami

Get the code with:

sudo apt-get install mercurial
hg clone http://infogami.org/hg/ infogami

Create your run.py

cd infogami
nano run.py

Paste the following into the run.py file:

import infogami
infogami.config.db_parameters = dict(dbn='postgres', db="infogami", user='postgres', pw='your-password')
infogami.config.site = 'sitename.local'
if __name__ == "__main__":
    infogami.run()

Save and exit.

Grant permission to infogami (and it child nodes)

cd ..
chmod -R 777 infogami/

Install Python Driver for PostgreSQL (python-psycopg2)

 sudo apt-get install python-psycopg2

Create the database and install infogami objects into it

cd infogami
sudo -u postgres createdb infogami
sudo -u postgres psql infogami < infogami/tdb/schema.sql
sudo -u postgres python run.py install

That’s it. You now have infogami installed on your machine.
to run it type:

sudo -u postgres python run.py

and nav your firefox to: http://loclahost:8080


How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)

Useful and simple guide, step by step.
http://www.supriyadisw.net/2007/02/postgresql-on-ubuntu-linux

Installing postgresql (8.2)

sudo apt-get install postgresql-8.2

Setting up the password for postgres’ postgres user

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'your-password';
\q

Configure postgres’ authentication method :

sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak
sudo nano /etc/postgresql/8.2/main/pg_hba.conf

Add the following at the bottom of the file

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all         127.0.0.1       255.255.255.0    password

Restart postgres:

sudo /etc/init.d/postgresql-8.2 restart

Getting rid of Insert Ubuntu Disc Message

This “Insert Disc” message was annoying and frustrating almost at any time I was trying to install a new software on my Ubuntu (7.10 gutsy-gibbon).

Media change: please insert the disc labeled 'Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016.1)' in the drive '/cdrom/' and press enter

If you want to get rid of it you should comment out the line that point to the “CD-ROM” Source.

Type the following in the terminal:

gksudo gedit /etc/apt/sources.list

Locate the line that reads:

deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted

and comment it out

#deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted

Save the file, close the editor, back in the terminal window type:

sudo apt-get update

Good luck and thank you for choosing Ubuntu.