How To install gcc on Nokia N900

For those of you who are looking to run GCC on the N900 here is a quick guide for packages to install. I am using the latest version of maemo, (fremantle-1.3).

First you are going to have to download the following packages on your computer. Links are provided to the repository directory, or if you prefer I will list a direct links to the most current packages:

binutils – – Latest:

libgcc1 – – Latest:

libgomp - – Latest:

c++ – – Latest:

gcc-4.2-base – – Latest:

gcc-4.2 - – Latest:

make – – Latest:

Plug your phone into your computer and select Mass Storage Mode.

Copy all the files into the MyDocs folder.

Now unmount the drive ( make sure all the files have copied ), and type in the following:

cd ~/MyDocs
dpkg -i *armel.deb

This will install all the packages.

Now to compile a c program you can use the application: gcc-4.2.

You can also use make files to build projects. Many c Makefiles are formatted with a CC variable defined:


You replace the previous line with the following to allow the makefile to run on your system:


If you have any questions please leave a comment and I will try to respond.

Update: I was able to successfully compile Marcan’s PS3 Firmware version 3.41 exploit using my N900. I compiled the ps3pwn part of the exploit and it ran well on my n900. I was not able to cross compile Stage 1 and Stage 2 binaries for the cell but they are available for download.

  • Get cheapest copy of bankruptcy discharge papers and bankruptcy records quickly in your email. Bankruptcy discharge papers only $9.99

  • saurabh

    HI ,
    I am using Maemo 5 , version 10.2010.19-1.004, and I followed teh same process as listed above except this line —> cd ~/MyDocs , rather i copied the files into ne directory called gccp and run the dpkg command –> dpkg -i *armel.deb , but I am getting this error .
    last lien of those were –>

    Errors encountered while processing :

    I dont know how to pipe the output of the command to any file w/o “>” sign , I am not able to find this sign in my N900 keypad.( or plz tell the way to redirect teh log to some file so that I could paste the same for further analysis).
    eagerly waiting for the reply…
    [email protected]

    • matland

      to type greater than char in term, press fn then ctrl (sym) then you'll get a dialog with special chars on screen

    • Juanzbelver


      I obtain just the same error

      Anyone know how to solve this problem? o another c compiler which works correctly

  • matland

    you might want to run “ln -s /usr/bin/gcc-4.2 /usr/bin/gcc” instead of changing makefiles all the time

  • Mburhanh7

    when i install them it gives an error.

    dpkg: status database area is locked by another process.