Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a file downloaded from the Internet.

To be specific I downloaded Code::Blocks from its official site. The file name is codeblocks.tar.bz2.

If I don't have Internet connection and also Ubuntu Software Center is not working, how do I install the software?

I think I will have to use terminal but I am not used to with terminal. So please make it as simple as possible.

share|improve this question
1  
A bit more information is needed, does the tar.bz2 contain the source code, or a deb file? which application is it? –  blade19899 Nov 9 '12 at 17:44
    
To be specific I downloaded codeblocks from the official codeblocks site. The file name is codeblocks.tar.bz2. –  Prakash Gautam Nov 9 '12 at 17:46
    
Can u provide the download link. I can't seem to find the file for download! –  blade19899 Nov 9 '12 at 17:56

3 Answers 3

up vote 3 down vote accepted

In codeblocks download section there are three options available.

  • Binaries
  • Source
  • SVN

Binaries

If you downloaded the package from Binaries section then your file will be something like this "codeblocks-10.05-1-debian-i386.tar.bz2"

  • untar the package file

    lbzip2 -d codeblocks-10.05-1-debian-i386.tar.bz2
    tar xvf codeblocks-10.05-1-debian-i386.tar

    or

    tar xvjf codeblocks-10.05-1-debian-i386.tar.bz2

    Then use dpkg -i package_name.deb or dpkg -i *.deb to install the package. Make sure you run the deb in proper order to avoid dependencies.

Source

Download the file, sample: codeblocks-10.05-1debian-src.tar.bz2 and untar it the same way how it is done for binaries.

./configure 
make
make install

make sure you have installed build-essential before trying the above steps.

SVN

You need install SVN package before proceeding the following steps.

Code base is at repository: http://svn.berlios.de/svnroot/repos/codeblocks/trunk

Checkout the code using command svn checkout http://svn.berlios.de/svnroot/repos/codeblocks/trunk. (This step needs internet connection.)

Read the README & README.debian for instructions on how to install without internet-access

share|improve this answer
    
For binaries, you could have add the GUI way. Using nautilus, right-click on the .tar.bz2 and Extract here. Then double-click on the .deb. –  user55822 Nov 9 '12 at 19:21
    
@user55822 feel free to edit the answer and help the OP. Thanks :) –  devav2 Nov 10 '12 at 4:43
    
I think i installed Code::Blocks following the procedure you gave for binaries because I can see codeblocks in application group when I search for it in dash. But when i click on it, codeblocks doesn't open, is there anything I have to do more. –  Prakash Gautam Nov 13 '12 at 15:56
    
Can you try opening the same in terminal and post the error message. Thanks –  devav2 Nov 13 '12 at 17:41
1  
I didn't try typing codeblocks in terminal before, but when I did it now; Code::Blocks opened and worked fine. –  Prakash Gautam Nov 14 '12 at 16:12

There's a step-by-step tutorial on the Codeblocks wiki for installing it on Ubuntu: Installing Code::Blocks nightly build on Ubuntu

If you aren't required to use Codeblocks, then perhaps you should try a more easily-installed C++ editor, such as Geany, which you can find in the Software Center or by typing (in the terminal):

sudo apt-get install geany

Geany is pretty nice as editors go. If you don't have Internet access, make sure to follow the steps to add the Ubuntu installation DVD/CD as a package source: Installing software packages without an Internet connection

share|improve this answer

You've probably downloaded a source tarball. Usually what that means is that you have to install libraries/utilities that are required to the compilation of your software and then configure, build and install the compiled program.

There's no single way to do that, usually when you unpack your tarball, there's either a README* or INSTALL* file that describes what needs to be done to install it. It's fairly common to just:

./configure --prefix=/opt/myapp
make
make install

There's a drawback to this method - you'll end up with files installed completely outside of your package management system that your PMS has no idea about and cannot manage. It's usually fine for temporary testing and if you know what you're doing and keep files installed in such a way in a separate directory.

You said you're not used to working in the terminal - unfortunately working in the terminal is the least complicated part of compiling programs from scratch.

You might want to find your application among packages already available to Ubuntu and download the Ubuntu distribution on the DVD and then use apt-cdrom to add it as a source of available packages.

PS. if what you've downloaded is an already built application, you can view the contents using:

tar tjf program.tar.bz2

and

tar xjf program.tar.bz2

but you have to be sure that you know what you're running. I'd look for the way to run your application in one of the files within that archive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.