linux卸载gdb,安装/卸载GDB

卸载原有GDB

1. 查询 gdb是否安装

[root@test01~]# rpm -qa |grep gdb

gdb-7.0.1-37.el5_7.1

gdbm-1.8.0-26.2.1

2. 删除包

rpm-e --nodeps gdb-7.0.1-37.el5_7.1

注:

rpm -qa 后面要跟上包的名字才能搜索到

比如,rpm-qa http 搜不到,是因为包的名字叫做 httpd

rpm-qa | grep是把搜索到的全部包的名字交给 grep 去过滤,只要包含那个字符串就会被显示出来

安装新版本GDB

1.获获取gdb-7.2.tar.gz版本安装包

如果为gdb-7.2.tar.gz形式的则用

[root@localhost]# tar –xvzf gdb-7.2.tar.gz

2.  安装执行步骤

基本上所有的源码包都是三步,configure,make,make install。 进入gdb解压后的目录,按顺序执行以下命令:

[root@test01gdb-7.2]#./configure

[root@test01gdb-7.2]#make

[root@test01gdb-7.2]#make instal

[root@test01gdb-7.2]# cp gdb/gdb /usr/bin

查看gdb版本

[root@test01 gdb-7.2]# gdb GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: .

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值