Debian使用小计

1. Debian无法apt install

debian安装完成后,如果运行apt install,提示

Media change: please insert the disc labeled
 'Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 CD Binary-1 20130504-14:44'
in the drive '/media/cdrom/' and press enter

表示安装的时候,默认使用了CD光盘。可以在/etc/apt/sources.list中,把cdrom一行注释或是删除。

 

2. vim无法安装

安装vim的时候提示

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:
 vim : Depends: vim-common (= 2:7.4.488-7+deb8u4) but 2:8.1.0875-5 is to be installed
       Depends: libtinfo5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

需要先卸载vim-common,因为需要的版本与现在安装的不一样。

sudo apt-get remove vim-common

然后再安装libtinfo5

sudo apt-get install libtinfo5

安装过程中,提示会删掉另外一个包,按照提示输入Yes, do as I say!继续就可以

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  ncurses-base ncurses-term
The following NEW packages will be installed:
  libtinfo5
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  ncurses-base
0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Need to get 282 kB of archives.
After this operation, 4,191 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say!

这个原因测试下来,好像因为桌面系统是xfce的原因。Gnome没有提示这些问题。

3. zsh模式下,回车键失效

安装设置成zsh后,回车键变成空格键,还有其他几个按键映射错误。运行

echo $TERM

输出是空。原来是xfce,换成gnome,没有问题。然后从gnome又换成xfce也没问题,怀疑是安装的时候默认选择xfce后续的一些配置问题。

 4.安装中断

如果apt install的时候因为特殊原因终端,再次运行会报错

E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

运行

ps aux | grep -i apt

找到对应进程然后kill -9 关掉

posted @ 2019-09-03 17:31  秋来叶黄  阅读(1109)  评论(0编辑  收藏  举报