简体   繁体   English

ubuntu中卸载emacs时出错

[英]error in uninstalling emacs in ubuntu

I am new to Linux and using Ubuntu. 我是Linux的新手,正在使用Ubuntu。 I was trying to add the sage math mode in emacs. 我试图在emacs中添加鼠尾草数学模式。 I did something wrong while editing the site-start.el file in ~/.emacs folder and emacs started to do some funny things. 在〜/ .emacs文件夹中编辑site-start.el文件时,我做错了事,而emacs开始做一些有趣的事情。 By mistake I deleted the emacs folder in ~/etc in which I did the editing. 我错误地删除了我在其中进行编辑的〜/ etc中的emacs文件夹。 Now whenever I in am trying to uninstall emacs. 现在,每当我尝试卸载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

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. 您可以尝试先重新安装emacs,然后再卸载。 Or something like 或类似的东西

apt-get remove --force emacs23

In general, you don't want to be deleting files in /etc by hand; 通常,您不希望手动删除/ etc中的文件。 it's better to let apt do this for you. 最好让它为您做这件事。

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. 因此,只需添加路径即可解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM