Linux常见错误
- 报错1
[root@localhost ~]# vim
-bash: vim: 未找到命令
- 安装vim
yum -y install vim*
# 查看是否安装成功
[root@hadoop01 hadoop]# rpm -qa |grep vim
vim-X11-7.4.629-8.el7_9.x86_64
vim-enhanced-7.4.629-8.el7_9.x86_64
vim-common-7.4.629-8.el7_9.x86_64
vim-minimal-7.4.629-8.el7_9.x86_64
vim-filesystem-7.4.629-8.el7_9.x86_64
- 报错2
[root@localhost software]# sh-keygen -t rsa
bash: sh-keygen: 未找到命令
- 安装
yum install openssh
# 查看是否安装成功
[root@localhost software]# rpm -qa|grep -E "openssh"
openssh-clients-7.4p1-23.el7_9.x86_64
openssh-7.4p1-23.el7_9.x86_64
openssh-server-7.4p1-23.el7_9.x86_64
# 安装完成后,仍然报错,需要关机重启
- 报错3
[root@master ~]# pip install scikit-learn -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: scikit-learn in /home/software/anaconda3/lib/python3.6/site-packages (0.19.1)
distributed 1.21.8 requires msgpack, which is not installed.
You are using pip version 10.0.1, however version 21.3,1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
- 解决方案:离线安装
# 浏览器搜索,下载linux版的
https://mirrors.aliyun.com/pypi/simple/scikit-learn/
# 上传到服务器
pip install scikit_learn-0.22-cp37-cp37m-manylinux1_x86_64.whl
# tar.gz文件
# 上传到服务器,解压
tar -zxvf *.tar.gz
# 进入文件目录
cd *
# 运行命令
python setup.py install
# 测试是否安装成功
# 进入python
[root@master ~]# python3
>>>import pymysql
- 报错4
CondaError: Failed to write to /home/software/anaconda3/pkgs/readline-8.1.2-h0f457ee_0.tar.bz2
errno: 28
OSError(28, 'No space left on device')
OSError(28, 'No space left on device')
- 解决方案
# 查看空间使用情况
[root@master ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 475M 0 475M 0% /dev
tmpfs 487M 4.0K 487M 1% /dev/shm
tmpfs 487M 7.7M 479M 2% /run
tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/mapper/centos-root 17G 17G 20K 100% /
/dev/sda1 1014M 168M 847M 17% /boot
tmpfs 98M 0 98M 0% /run/user/0
# 空间占用
[root@master software]# du -sh /home/* |grep G
7.3G /home/software
# 删除一些不用的压缩包等
-
双击硬盘
-
碎片整理,扩展