2

I can't install build-essential on my laptop :

It shows error:

The following packages have unmet dependencies:
build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Tim
  • 33,500
Jack
  • 121

3 Answers3

2

At the very end of that list of unmet dependencies you may find that it lists this tidbit

Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Try typing the following into the command line

sudo apt-get -f install

It should then prompt you with the packages it will be installing together with

Do you want to continue [Y/n]?

you should be able to move forward after that with

sudo apt-get install build-essential
Marc
  • 123
-1

The build-essentials is a reference for all the packages needed to compile a debian package. It generally includes the gcc/g++ compilers an libraries and some other utils. Check the documentation Here

To install build essentials, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2 ruby-full mysql-server libmysqlclient-dev libmysql-ruby libssl-dev libopenssl-ruby libcurl4-openssl-dev imagemagick libmagickwand-dev git-core redis-server libffi-dev libffi-ruby rubygems libsqlite3-dev libpq-dev libreadline5 openjdk-7-jre nodejs libncurses5-dev openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libyaml-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config

Source:Diaspora Project

Mitch
  • 109,787
-3

The following packages have unmet dependencies: build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed This error is caused by error in your source list, you need edit this file:

    root@debian:~# nano /etc/apt/sources.list

Remove conflict sources and then add this line:

    deb http://ftp.debian.org/debian/ stable main contrib non-free 

then:

    root@debian:~# apt-get update

    root@debian:~# apt-cache search build-essential --names-only 

    build-essential - Informational list of build-essential packages

    root@debian:~# sudo apt-get install build-essential

that's all...regards...

Visit http://forums.debian.net/viewtopic.php?f=30&t=84184