Problem Description
When installing FastDFS
( yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y
) on the Linux server , the installation fails, prompting yum repolist all
.
Following the prompt, I tried to type yum repolist all
, but it was displayed 0
.
So go back to the first picture, this hint There are no enabled repos.
.
Blindly guess whether there is no installation wget
source?
Knock wget _v
detect what version to try
Dude, you really have not installed wget
...
solve
The following is a demonstration for two servers with different Linux versions.
- CentOS
- Ubuntu
I do not know what the server version of Linux, you can use
lsb_release -a
to view specific information about the current version of the Linux distribution
1. CentOS
According to Netease's "CentOS mirrors Using Help": http: //mirrors.163.com/.help/centos.html
- Backup first
/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
If can not find the
yum.repos.d
folder,mkdir
create a
mkdir /etc/yum.repos.d
can
- Download the corresponding version of the repo file and put it in
/etc/yum.repos.d/
(please make a corresponding backup before operation, if any)
Use to
ls
view the file:
- Run the following command to generate the cache
# 清除缓存
yum clean all
# 生成缓存
yum makecache
- installation
wget
yum install wget
2. Ubuntu
The reason
Ubuntu
does not support theyum
download and installation mechanism
It should apt-get
be installed separately using the package tool:
apt-get install openssl
apt-get install libssl-dev