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.

This problem has been bothering me for quite a while. I have spent hours trying to find out what is wrong but I just could not solve it. When I try to do sudo apt-get install slapd with all the other OpenLDAP and ldap-utils installed, this is what happens:

The following NEW packages will be installed:
  slapd
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/1738 kB of archives.
After this operation, 4199 kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_SG:en",
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_SG.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package slapd.
(Reading database ... 174703 files and directories currently installed.)
Unpacking slapd (from .../slapd_2.4.31-1+nmu2ubuntu3_amd64.deb) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Processing triggers for man-db ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Processing triggers for ufw ...
Processing triggers for ureadahead ...
Setting up slapd (2.4.31-1+nmu2ubuntu3) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
  Creating initial configuration... Loading the initial configuration from the ldif file () failed with
the following error while running slapadd:
    53358740 str2entry: invalid value for attributeType objectClass #0 (syntax 1.3.6.1.4.1.1466.115.121.1.38)
    slapadd: could not parse entry (line=1038)
dpkg: error processing slapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ufw ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be appreciated.

share|improve this question
    
Do you have a language pack installed? sudo apt-get install language-pack-en-base may fix this error, according to this. –  Jos Mar 28 at 15:06
    
Yeah I have that already :/ –  user262968 Mar 29 at 1:23

1 Answer 1

The message

" 53358740 str2entry: invalid value for attributeType objectClass #0 (syntax 1.3.6.1.4.1.1466.115.121.1.38)"

seems to be essential to finding a solution to your problem.

I believe you have a malformed objectClass definition. When ldap is installed it adds some default objectClass definitions to your ldap tree. Possibly one of these have been corrupted or modified so it fails when attempting to add it.

Fix the objectClass

grep -R str2entry /etc/

should help you find the file

Or perhaps the simplest solution is to purge your ldap installation completely so that you start from scratch with your installation process.

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.