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 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥15 python天天向上类似问题,但没有清零
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?