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'm trying to do this tutorial but it gived me an error because can't find packages and I solved like in this answer now I'm getting this error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ldap-utils : Depends: libldap-2.4-2 (= 2.4.28-1.1ubuntu4.4) but 2.4.31-1ubuntu2 is to be installed
 slapd : Depends: libldap-2.4-2 (= 2.4.28-1.1ubuntu4.4) but 2.4.31-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

when I run

sudo apt-get install slapd ldap-utils

I'm using Ubuntu 12.10.

I'm trying to get around this for a while and I just can't understand why a lot of commands have errors, tutorials don't work... It seems that nothing works, this is just a problem. What am I doing wrong? How others are doing older tutorials? I've come to have nested problems up to 5 levels, that's just crazy...

Update - try to install dependencies

root@ubuntu:/opt/lampp# sudo apt-get install libldap-2.4-2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libldap-2.4-2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Even tried:

root@ubuntu:/opt/lampp# sudo apt-get install libldap-2.4-31-1ubuntu2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libldap-2.4-31-1ubuntu2

E: Couldn't find any package by regex 'libldap-2.4-31-1ubuntu2'

Sources:

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
share|improve this question
    
Is this: pastebin.com/raw.php?i=uzhrtg5M –  Totty Dec 29 '13 at 21:11
    
updated, see my answer. it has been solved –  Totty Dec 29 '13 at 21:15
add comment

3 Answers

E: Unable to correct problems, you have held broken packages.

Have you tried going to Synaptic and checking what's wrong? I'd suggest doing so. Seems like some packages didn't configure or something happened.

share|improve this answer
    
I'm newbe. I can't understand what you are telling me to do... How do I check what is wrong? –  Totty Dec 29 '13 at 20:38
    
Install Synaptic Package Manager from Ubuntu Software Center, and in Synaptic filter broken packages. Mark all for reinstallation and click apply. You will be prompted for your password when you'll open Synaptic. –  Xylo Dec 29 '13 at 20:40
    
It tells me that I have no broken packages –  Totty Dec 29 '13 at 20:50
    
Download the dependencies from repository and install them all manually. –  Xylo Dec 29 '13 at 20:51
    
I've updated my question. It tells me that the dependency is already updated... –  Totty Dec 29 '13 at 20:53
add comment

Doing what this tutorial messed up with my sources. These are the new sources that seems to work better:

deb http://pt.archive.ubuntu.com/ubuntu/ quantal main 
deb-src http://pt.archive.ubuntu.com/ubuntu/ quantal main 

Why ubuntu don't decide itself and maintain something that works?

share|improve this answer
add comment

Actually the problem is more serious of what your answer shows. You were using precise repositories in quantal installation, this will surely cause problem later, is the best if you edit your sources.list to make it looks like this:

deb http://us.archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ quantal-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ quantal-updates main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-security main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-updates main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse 
deb http://archive.canonical.com/ubuntu quantal partner
deb-src http://archive.canonical.com/ubuntu quantal partner
deb http://extras.ubuntu.com/ubuntu quantal main
deb-src http://extras.ubuntu.com/ubuntu quantal main

Then do sudo apt-get update and sudo apt-get upgrade. This will make sure that you have the quantal packages instead precise's.

share|improve this answer
add comment

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.