我的虚拟机系统是ubuntu18,要安装redis5.0.7
本文记录了安装redis的曲折之路……
问题描述
已经在官网上下载好了redis并解压
wget http://download.redis.io/redis-5.0.7.tar.gz
tar xvzf redis-5.0.7.tar.gz
cd redis-5.0.7
sudo make install
于是遇到问题
解决方案
听说要先安装gcc,装了以后但仍然会报错
看了别人的文章,原来要修改sources.list 换回外国的源deb(原来是因为之前我改成了国内的源?),再重新安装gcc
具体过程
apt remove gcc --卸载gcc
cd /etc/apt --修改sources.list 换成外国的源deb
sudo vi sources.list
幸好之前换源的时候有备份
# deb cdrom:[Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/