debian

对于安装、更新软件出现unable to locate package时的问题

或者出现

更换介质:请把标有
 “Debian GNU/Linux 9.4.0 _Stretch_ – Official amd64 DVD Binary-1 20180310-11:21”
的盘片插入驱动器“/media/cdrom/”再按「回车」键

,配置apt-get源来解决

root@debian:~$ cp /etc/apt/sources.list /etc/apt/sources.listbak #备份原有配置文件
root@debian:~$ vi /etc/apt/sources.list #编辑

 

# 官方安全更新的源 (推荐)
deb http://security.debian.org/ squeeze/updates main

修改成163源:

deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib

修改成清华源:

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib

修改成科大源:

deb http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib

 

安装sudo

apt-get install sudo

安装vim

sudo apt-get install vim

 

默认不能输入中文,按照下面方法来配置

1配置源
# vim /etc/apt/source.list
最后增加中国科学技术大学的源(其他的应该也可以):
deb
http://mirrors.ustc.edu.cn/debian stable main contrib non-freedeb-src
http://mirrors.ustc.edu.cn/debian stable main contrib non-freedeb
http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-freedeb-srchttp://mirrors.ustc.edu.cn/debian
stable-proposed-updates main contrib non-free
然后更新
# aptitude update
2安装包:
# aptitude install fcitx fcitx-frontend-all fcitx-module-x11
安装完成之后,打字时汉字是出来了,单色没有选项,不要着急继续:
# apt-get install fcitx-ui-classic && apt-get install fcitx-ui-light

# aptitude install fcitx fcitx-table-wubi-large fcitx-ui-classic fcitx-ui-light fcitx-frontend-gtk3 fcitx-config-gtk
3 然后估计在输入法配置中有好几个输入法,留下了 sunpinyin和英语,其他的删掉就ok了
我就是按照上面的方法重启就生效了

 

发现不能用无线网,用以下方法来解决

sudo vi /etc/apt/sources.list
---------
.....
deb http://httpredir.debian.org/debian/ stretch main contrib non-free
---------

sudo apt update
sudo apt install firmware-iwlwifi

su -
modprobe -r iwlwifi
modprobe iwlwifi

 

在使用过程中出现,‘用户名’不再sudoers文件中。此事将被报告

我们可以直接在终端中输入visudo 等同于 vim /etc/sudoers

找到root,格式和root一样就行

root  ALL=(ALL:ALL) ALL

sunlizhao  ALL=(ALL:ALL) ALL

ctrl+o 保存      ctrl+x 退出

 

原文链接:https://www.cnblogs.com/sunlizhao/p/8688158.html
本文来源 爱码网,其版权均为 原网址 所有 与本站无关,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源。

© 版权声明

相关文章