0

I am new to Linux and using Ubuntu. I was trying to add the sage math mode in emacs. I did something wrong while editing the site-start.el file in ~/.emacs folder and emacs started to do some funny things. By mistake I deleted the emacs folder in ~/etc in which I did the editing. Now whenever I in am trying to uninstall emacs. I am getting the following error message. Can some help me out on this. Thanks Anil

installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
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_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 322690 files and directories currently installed.)
Removing emacs ...
Setting up emacs23 (23.3+1-1ubuntu9.2) ...
emacs-install emacs23
install/dictionaries-common: Already byte-compiled for emacs23. Skipping ...
emacsen-common: Handling install of emacsen flavor emacs23
emacsen-common: byte-compiling for emacs23
cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory
emacs-install: /usr/lib/emacsen-common/packages/install/emacsen-common emacs23 failed at         /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 2.
dpkg: error processing emacs23 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
emacs23
Error in function: 
Setting up emacs23 (23.3+1-1ubuntu9.2) ...
emacs-install emacs23
install/dictionaries-common: Already byte-compiled for emacs23. Skipping ...
emacsen-common: Handling install of emacsen flavor emacs23
emacsen-common: byte-compiling for emacs23
cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or directory
emacs-install: /usr/lib/emacsen-common/packages/install/emacsen-common emacs23 failed at   /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 2.
dpkg: error processing emacs23 (--configure):
subprocess installed post-installation script returned error exit status 1
Anil
  • 3
  • 2
  • 1
    Don't you want to follow up your precedent question ? http://stackoverflow.com/questions/22500350/sage-emacs-mode-not-working-in-ubuntu/22500967#22500967 – Ehvince Mar 20 '14 at 15:39

2 Answers2

1

Well, the error being reported is this...

cp: cannot stat `/etc/emacs/site-start.d/00debian-vars.el': No such file or di

which from what you say, you deleted by hand (as far as I can tell -- your report is not very precise, so there is some guess work going on.

You could try reinstalling emacs first and then uninstalling. Or something like

apt-get remove --force emacs23

In general, you don't want to be deleting files in /etc by hand; it's better to let apt do this for you.

Phil Lord
  • 2,917
  • 1
  • 20
  • 31
-1

Finally did it by fooling the error. Just added the said directories and files which were giving error. The uninstallation script needs the physical files and directory paths. So simply adding the paths does the trick.

Anil
  • 3
  • 2
  • 1
    Please don't add "thank you" as an answer. Once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation), you will be able to [vote up questions and answers](http://stackoverflow.com/help/privileges/vote-up) that you found helpful. – summea Mar 21 '14 at 17:33