0

I am totally new to Linux. All my studies are now dependent on it. So I've installed Ubuntu in my laptop. I need to install few software packages for my compiler course to run llvm (I am following the instructions from http://llvm.org/docs/GettingStarted.html). Following are the packages I need to install:

Package Version
GNU Make 3.79, 3.79.1; GCC >=4.7.0; python >=2.7; GNU M4 1.4; GNU Autoconf 2.60; GNU Automake 1.9.6; libtool 1.5.22; zlib >=1.2.3.4;

I will be using sudo apt-get install...............build-essential. Can anyone tell me what should I insert in the dot dot area to install all of the above? Also, do need to install Z and Zlibc? if yes, then what are their purposes?

closed as too broad by A.B., user364819, David Foerster, waltinator, Ron Sep 14 '15 at 16:48

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What Ubuntu version are you using and what version of llvm do you need? Do you really need to do anything more than install the standard binary package of llvm from the repository (sudo apt-get install llvm - or use the Software Center)? – steeldriver Sep 12 '15 at 21:07
  • Hi. my Ubuntu version is 14.04. I am not sure about the llvm version. I'm just following the instructions from their site and that does not use the sudo apt-get command to install llvm. I already configured it but I need to install the other packages to compile llvm. – fhaque Sep 13 '15 at 6:00
1

I have tried to answer your question as it stands: however please read this first

How to install Ubuntu software when you're an ex-Windows user!

and seriously consider whether the instructions you are following are appropriate and necessary.


In general, you will need to use apt-cache (or browse the Software Center) - along with a little common sense. For example:

$ apt-cache policy m4
m4:
  Installed: 1.4.17-2ubuntu1
  Candidate: 1.4.17-2ubuntu1
  Version table:
 *** 1.4.17-2ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

tells me that my system (Ubuntu 14.04) already has m4 version 4.17 (specifically, the Ubuntu build 1.4.17-2ubuntu1) and that it's already installed. If it wasn't already installed, then the package I would need to add to the apt-get command would simply be m4.

Sometimes, things are a little trickier. For example

$ apt-cache policy zlib
N: Unable to locate package zlib

in which case we need to do a bit of guesswork - let's try

$ apt-cache search devel | grep zlib
zlib1g-dbg - compression library - development
zlib1g-dev - compression library - development
libkaz-dev - Kazlib's reusable data structure development tools
gambas3-gb-compress-bzlib2 - Gambas bzlib2 component
gambas3-gb-compress-zlib - Gambas zlib compression component
gauche-zlib - zlib binding for Gauche
lua-zlib-dev - zlib development files for the Lua language

from which we might deduce that the actual primary zlib development package is probably zlib1g-dev; let's dig a little deeper

$ apt-cache show zlib1g-dev
Package: zlib1g-dev
Priority: optional
Section: libdevel
Installed-Size: 443
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Mark Brown <broonie@debian.org>
Architecture: amd64
Source: zlib
Version: 1:1.2.8.dfsg-1ubuntu1
Provides: libz-dev
Depends: zlib1g (= 1:1.2.8.dfsg-1ubuntu1), libc6-dev | libc-dev
Conflicts: zlib1-dev
Filename: pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_amd64.deb
Size: 183378
MD5sum: baf554d3c4a2cc8b2d9a190c04e9e3d7
SHA1: b5c073d1a419915ed9c3047d2f04aaed24268c47
SHA256: d44332327123a4fef16ededcffac98ac0425402f9c2ccc8e42193b122f8a54b8
Description-en: compression library - development
 zlib is a library implementing the deflate compression method found
 in gzip and PKZIP.  This package includes the development support
 files.
Description-md5: d7f4e8a626131fc83c643c5d59096290
Multi-Arch: same
Homepage: http://zlib.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y

OK - that indeed sounds like the thing we need - so what is its version in the repository?

$ apt-cache policy zlib1g-dev 
zlib1g-dev:
  Installed: 1:1.2.8.dfsg-1ubuntu1
  Candidate: 1:1.2.8.dfsg-1ubuntu1
  Version table:
 *** 1:1.2.8.dfsg-1ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

i.e. version 1.2.8, again exceeding the minimum requirement (1.2.3.4) of the software you are trying to build.

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