package installation fails

Asked by HASHIR

while a try to install packages, an error message is coming like following: (please help me to solve the issue)

Package operation failed
The installation or removal of a software package failed.

-Details
user1@user1-System-Product-Name:~$ LANG=C;sudo aptitude dist-upgrade
The following partially installed packages will be configured:
  ttf-droid
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up ttf-droid (1.00~b112+dfsg+1-0ubuntu1) ...
/etc/defoma/hints/ttf-droid.hints: Unable to open, or empty.
dpkg: error processing ttf-droid (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 ttf-droid
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:

user1@user1-System-Product-Name:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Sam_ (and-sam) said :
#1

You could try first to generate the local you prefer and in case reconfigure.
To see which locales are installed:
locale -a

Generate
e.g.
sudo locale-gen en_US.UTF-8

Reconfigure:
sudo dpkg-reconfigure locales

In case reconfiguration still outputs errors install:
sudo apt-get install locales

or install the language pack you're missing
e.g.
sudo apt-get install language-pack-en

also take a look at
system administration -> language support
it might ask to install missing language packages.

Reference.
https://help.ubuntu.com/community/EnvironmentVariables#Locale%20setting%20variables
http://ubuntuforums.org/showthread.php?t=75493
https://lists.ubuntu.com/archives/ubuntu-devel/2005-January/003336.html

Revision history for this message
HASHIR (h2hashir) said :
#2

error is not solved:
still in terminal it is showing like following. Please help me

hashir@hashir-laptop:~$ sudo apt-get install locales
[sudo] password for hashir:
Reading package lists... Done
Building dependency tree
Reading state information... Done
locales is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up secvpn (2.22) ...
Starting Monitor Daemon for Secure Virtual Private Network: cp: cannot stat `/etc/inittab': No such file or directory
invoke-rc.d: initscript secvpnmon, action "start" failed.
dpkg: error processing secvpn (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 secvpn
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
HASHIR (h2hashir) said :
#3

problem is not solved

Revision history for this message
Sam_ (and-sam) said :
#4

Hashir,
the output doesn't state an issue with locales anymore, but with secvpn, hence acutally it should be a new question. Please mark it as solved.

For further details according secvpn see the bug report.
https://bugs.launchpad.net/ubuntu/+source/secvpn/+bug/327482

About VPN.
http://tldp.org/HOWTO/VPN-HOWTO/
https://help.ubuntu.com/10.04/serverguide/C/openvpn.html

Dups of this question.
https://answers.launchpad.net/ubuntu/+source/software-center/+question/118112
http://ubuntuforums.org/showthread.php?p=9604082

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#5

Open a Terminal from the menu Applications->Accessories->Terminal

Tip: right click with mouse on the terminal title caption and select the item "Always on Top" doing this you will force the terminal window to stay on top of the other windows and you will find very easy to copy single row from this web page into the terminal...
Something more about using the terminal https://help.ubuntu.com/community/UsingTheTerminal

Then type or better copy and paste a row a time then press enter:
(Tip: select the single row to copy then right click into the terminal and to quick paste click with middle button of mouse )

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo aptitude clean
LANG=C;sudo aptitude autoclean
LANG=C;sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo aptitude install -f
LANG=C;sudo aptitude update
LANG=C;sudo aptitude dist-upgrade

give your user password when requested, you don't see nothing when you type it, then press enter.

Then please also be sure you have System→Administration→Language support installed and configured.

Hth

Hope this helps

Revision history for this message
HASHIR (h2hashir) said :
#6

Thanks marcobra (Marco Braida), that solved my question.

Revision history for this message
lenin leishangthem (lei-meitei) said :
#7

i have the same problem ... and my ALSA
l@l-laptop:~$ sudo apt-get install locales
Reading package lists... Done
Building dependency tree
Reading state information... Done
locales is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up alsa-driver-linuxant (1.0.23.0) ...
Building modules for the 2.6.35-22-generic kernel, please wait... done.
ERROR: Build failed. Please review the build log at /tmp/alsa-driver-linuxant.12023.log
dpkg: error processing alsa-driver-linuxant (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 alsa-driver-linuxant
E: Sub-process /usr/bin/dpkg returned an error code (1)