Results 1 to 10 of 10

Thread: Compiling from source

  1. #1
    Join Date
    Aug 2012
    Beans
    538

    Compiling from source

    Hello,
    I am new to the wonderful world of open source and I'm loving it. But where I keep getting stuck and my progress gets hindered is, when I try to install packages from source. I have read about ./configure, make and make install and what they do, but I guess I'll get better at compiling the more I try it hands-on.

    It would be great if we could have a forum where most troubleshooting to installations are discussed ? Is there something of that sort already ? Or else, I would like to update this thread as and when I find something new to help beginners like me.

    1)At the moment, I'm having problems installing google-chrome from source.
    a)I have a .deb called google-chrome-stable_current_amd64.deb and I tried doing
    Code:
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    but it gives me an error saying,

    Code:
    Errors were encountered while processing: google-chrome-stable
    b)I tried ar vx google-chrome-stable_current_amd64.deb and it gives me 3 files called control.tar.gz, data.tar.lzma and debian-binary. I don't know what to do with these.

    2)Is a .deb file a compressed form of the executables, no source code, whereas .tar.bz2 etc contain source code ?

    3)Why does linux have so many file types. .tar, .tar.gz, .tar.bz2, .deb .rpm src.rpm

    Thanks
    Last edited by lisati; October 28th, 2012 at 06:35 AM. Reason: fix tag

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Compiling from source

    Instead of answering your question, here's one for you. Why are you compiling programs from source, when the majority of them are already packaged as .debs?

    Ubuntu is the 1000lb gorilla of Linux distributions, even most third party programs are available in .deb format.

  3. #3
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Compiling from source

    On a) You need to do:
    Code:
    apt-get install lsb
    first

    lsb - Linux Standard Base 4.0 support package

    Unlike apt, dpkg does not do automagic dependency resolution for you.

    on b 2)
    A .deb is the equivalent of a windows installer file. It may contain the executable, but it may also contain sourcecode. Usually it contains the executable and other files that need to be installed.

    For the packages supplied in ubuntu, you can usually do a apt-get source "package-name"
    and you get the source via .deb file installed directly on your computer.
    The source is not enough, by the way, you also need the dependencies of the source.
    Which you get via: apt-get build-dep "packagename"

    .tar is simply an abbrevation for tape archive (from ancient times, for backups on a tape). That is, all files in a folder and subfolders (e.g. 1'000'000 files) merged into ONE file.

    .tar.bz2 is a tape archived file that has been compressed using the bzip-2 compression algorithm.


    3)
    These file types are not Linux specific (except *.deb, *.rpm, which are the equivalent of a .msi file on windows [or setup.exe]).

    tar and tar.bz2 I have already explained
    tar.gz is a .tar file that has been compressed using the gzip compression algorithm.
    By the way, other notable compressed formats are .zip, .zipx, .rar, .cab.
    On Linux you'll also find .tar.lzma, which is a .tar file that has been compressed using the Lempel-Ziv-Markov algorithm. These files are sometimes called .7z, because this is the file type extension that 7zip windows program uses when it LZMA-compresses a file/files.

    There exist so many files, because there exist so many compression algorithms.
    And most of these file-types have nothing to do with Linux itself.
    Each algorithm has advantages and disadvantages, and the algorithm's efficiency are optimized for certain use cases, or superseded by a new version (bzip2 supersedes bzip).

    By the way, a .deb file is simply a .zip file renamed to .deb.
    .RPM might be the same.

    The difference between .deb and .rpm is, .deb is a Debian package file, while .rpm is a Red Hat package manager file. So, .deb is for Debian-based Linux distributions (like Ubuntu), while .rpm is fore red hat based Linux distributions (like CentOS or Fedora).
    Last edited by WitchCraft; October 28th, 2012 at 12:28 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  4. #4
    Join Date
    Mar 2013
    Beans
    10

    Unhappy getting the source code of a particular package

    I tried to fetch the source code of vlc with

    apt-get source vlc

    but it failed can anyone help me with this..

    apt-get source vlc
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to find a source package for vlc


    shows the error i encountered

  5. #5
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    7,943
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Compiling from source

    You must add the source repositories in /etc/apt/sources.list. You can add it through synaptic. It's probably easier using "Software Manager"==>Edit==>Software Sources. Check the box that says Source Code. Then refresh the repositories. Close Software Manager. You can only have one package manager open at a time.

    Now install build-essentials:

    Code:
    sudo apt-get install build-essentials
    sudo apt-get source vlc
    There's a little more to it than that. Some light reading: https://help.ubuntu.com/community/CompileVLC
    Last edited by tgalati4; March 21st, 2013 at 05:13 AM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  6. #6
    Join Date
    Mar 2013
    Beans
    10

    Re: Compiling from source

    Thanks pal, it realy works.......

  7. #7
    Join Date
    Mar 2013
    Beans
    10

    Re: Compiling from source

    does the procedure vary on linux mint maya

  8. #8
    Join Date
    Feb 2008
    Beans
    4,242
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Compiling from source

    Actually, the package is "build-essential" without an 's' at the end. For doing this, Mint and Ubuntu are identical.

    However... VLC is huge, with a ton of dependencies! If this is the first time you are compiling from source, pick something small. Install VLC from Synaptic.

  9. #9
    Join Date
    Dec 2006
    Beans
    6,932

    Re: Compiling from source

    Quote Originally Posted by gordintoronto View Post
    Actually, the package is "build-essential" without an 's' at the end. For doing this, Mint and Ubuntu are identical.

    However... VLC is huge, with a ton of dependencies! If this is the first time you are compiling from source, pick something small. Install VLC from Synaptic.
    Indeed, this slightly dated guide clearly demonstrates that quite clearly:

    https://help.ubuntu.com/community/CompileVLC
    You think that's air you're breathing now?

  10. #10
    Join Date
    Mar 2013
    Beans
    10

    Re: Compiling from source

    thanks pal

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •