linux软件包下载解压安装

本文详细介绍了在Linux环境下使用wget下载yum仓库配置,通过rz和Xftp传输文件,利用tar命令解压安装包,并展示了如何在root权限下进行软件包的编译和安装。同时,文章还涉及了gcc编译器的安装与使用,以及在编译过程中遇到的权限问题解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下载一个文件

博友可以先看完博客:《Linux软件包详解》

                                     《Linux中安装yum仓库详解》

                                       《Linux中tar命令》用于解压安装包 

的基础上学习

wget -o /etc/yum.repos.d/haha.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

windows下软件包传输到Linux

           命令:rz

           或者用:Xftp

         

[root@localhost test]# tar -zxvf tree-1.7.0.gz

 [root@localhost tree-1.7.0]# yum install gcc* -y

[root@localhost tree-1.7.0]# make

将.c编译成.o

 

二.

[root@localhost test]# which tar

/usr/bin/tar

[root@localhost test]# mv /usr/bin/tar /usr/bin/tar.bak

[root@localhost test]# tar.bak -zxvf tar-1.29.tar.gz

[root@localhost tar-1.29]# ./configure

configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)

See `config.log' for more details提示不能在Root用户下

-----------------------

-rwxr-xr-x. 1 xxx users 980931 5月  16 2016 configure

[ceshi@localhost tar-1.29]$ su - xxx

[xxx@localhost tar-1.29]$ ./configure

Exit切换到root

编译须在root下

[root@localhost tar-1.29]# make install

清除缓存

[root@localhost test]# hash -d tar

[root@localhost test]# tar -zxvf tree-1.7.0.gz

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值