douxin20081125 2017-03-22 02:11 采纳率: 0%
浏览 460

如何从CentOS删除golang软件包

How to remove golang packages from CentOS. I am unable to "yum remove golang" as it returns a no match error. How do I perform wildcard removal on CentOS to remove all the below packages

golang.x86_64                           1.6.3-2.el7                    base     
golang-bin.x86_64                       1.6.3-2.el7                    base     
golang-bitbucket-kardianos-osext-devel.noarch
golang-bitbucket-ww-goautoneg-devel.noarch
golang-bitbucket-ww-goautoneg-unit-test.x86_64
golang-cover.x86_64                     0-1.0.hgd32b5854c941.el7       epel     
golang-docs.noarch                      1.6.3-2.el7                    base     
golang-github-codegangsta-cli-devel.noarch
golang-github-coreos-go-log-devel.noarch
golang-github-coreos-go-systemd-devel.noarch
golang-github-cpuguy83-go-md2man.x86_64 1.0.4-2.el7_2                  base     
golang-github-cpuguy83-go-md2man-devel.noarch
golang-github-docopt-docopt-go-devel.noarch
golang-github-fsouza-go-dockerclient-devel.x86_64
golang-github-godbus-dbus-devel.noarch  0-0.1.gitcb98efb.el7.centos    extras   
golang-pkg-linux-386.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-linux-amd64.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-linux-arm.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-386.noarch            1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-amd64.noarch          1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-arm.noarch            1.4.2-1.el7.centos             extras   
golang-pkg-openbsd-386.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-openbsd-amd64.noarch         1.4.2-1.el7.centos             extras   
golang-pkg-plan9-386.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-plan9-amd64.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-windows-386.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-windows-amd64.noarch         1.4.2-1.el7.centos             extras   
golang-src.noarch                       1.6.3-2.el7                    base     
golang-tests.noarch                     1.6.3-2.el7                    base     
golang-vet.x86_64                       0-1.0.hgd32b5854c941.el7       epel     
golang-vim.noarch                       1.3.3-2.el7_0                  extras   
  • 写回答

5条回答

  • dongtan7201 2017-03-22 08:16
    关注

    Golang is currently only available in version 1.6.3 on CentOS. Therefore you should "install" it manually as described here. I assume this is what you did and therefore, you will have to uninstall it manually as well.

    1. Remove the Go binary folder

    To find out where you installed Go, run

    which go
    

    which will return the location of the Go binary.

    Next, remove the Go-Folder (as returned by the command above), for example:

    [sudo] rm -rf /usr/local/go
    

    2. Remove extension of Environment varialbles

    Finally, you should remove the extension of environment variables. Usually this is done in one of the following files

    /etc/profile
    ~/.profile
    

    Remove any line that either sets the GOROOT or extends the PATH environment variable, so everything that looks like this:

    export PATH=$PATH:/usr/local/go/bin
    export GOROOT=$HOME/go1.X
    export PATH=$PATH:$GOROOT/bin
    
    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿