Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Problem with installation and updates of the GO language

  1. #1
    Join Date
    Mar 2012
    Location
    Bowen Mountain, NSW, Australia
    Posts
    30

    Default Problem with installation and updates of the GO language

    Several months ago I installed GO via Yast. The "GO PROGRAMMING LANGUAGE" book required at least GO version 1.9. So I ticked go1.9 and go1.9-race in Yast. The result was that go, go1.4, go1.6, go1.7, go1.8 as well as go1.9 and the corresponding go-race versions were installed. When I subsequently ran GO, the version was 1.4.3-21.1 - the lowest version. I found no way to change that. That version worked Ok for the early chapters of the GO book, although I would like to run GO version 1.9 eventually.
    Subsequently problems started with updates. For weeks now there was an automatic update "opensuse-2018-218(1) security update for go", which always fails with "Update Error: Subprocess failed. Error: RPM failed". I then tried to do an update with Yast. The "opensuse-2018-218(1) security update for go" failed there also with a slightly longer error message - same as above + "error package go-1.9.2-30.1.x87_64 is nor installed 1.9.4-33.1".
    In desperation I tried to uninstall all the versions of GO by putting a X on each package in Yast. Unfortunately that failed as well. There were similar RPM errors after the attempted rm commands.
    Now GO no longer works - it is completely broken and cannot be uninstalled or updated.

    Can anyone help me how to solve this problem.

    Hardware 2 x Intel Pentium CPU 8940 @ 2.0 GHz, 3.7 GiB Ram, 500 GB SSD disk

  2. #2
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default Re: Problem with installation and updates of the GO language

    yes the opensuse install of go appears a mess.

    what do you mean by it cannot be removed? have you tried with zypper and can you present the cli dialogue.

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,477
    Blog Entries
    2

    Default Re: Problem with installation and updates of the GO language

    It's possible to install only Go 1.9.
    But, if you do install multiple versions of "go" then you can switch between them easily (see below)

    The following is how I did this...

    Although probably not a critical option, because I intend to develop using the Go language and not just run pre-built Go applications, I recommend adding the Go language repository. You can do this using the YaST Software Repository management module or possibly zypper. Oddly, in this case my attempt using zypper failed for unknown reasons so I did this using YaST. The URL for the 42.3 Go repo is the following
    Code:
    http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_42.3/
    I then used YaST Software Manager, and did a search for go, found "Go 1.9" and checked the box for installation
    Side note:
    As long as I was using YaST Software Manager (I usually don't), I also checked Patterns (nothing go-related existed), Packages (no results), and RPM groups (Only Go 1.4 listed). So, these other "views" don't really fully work.

    After Checking "Go 1.9" I also noted packages for Go 1.8 and Go 1.7 were selected.
    I unchecked those boxes, deselecting those unwanted Go versions.

    Now, after clicking the "Accept" button to install the selected packages, the following Summary displayed



    Proceeding with the Install, the installation completed successfully displaying the following




    So,
    It's possible to install a specific version of Go without the other undesirable versions.

    But,
    If you do install multiple versions of Go on your system, it looks like you can use update-alternatives to switch between each installed version. To switch between go versions, run the following command and select what you want
    Code:
    update-alternatives --config go

    Now,
    To your current situation...

    From your description, I wonder if you installed the complete selection of Go packages... note in the first screenshot above that "Go 1.9" is the actual Go package you should install (the others are then selected automatically) but "Go 1.9-race" is <not> the complete package... It's only a collection of add-on functions to address race conditions.

    See if the following command runs, and post the result to see what packages are supposedly installed on your system
    Code:
    # zypper se -i 'go'
    BTW -
    Your situation might have been the result of a self-inflicted mistake but is not that uncommon when developing...
    It's a major reason why whenever possible I do all my development in virtual machines so that when the system is borked, I just disgard and fire up a new virtual machine (a copy of my development install and project so I don't have to re-install everything all over again).
    My physical machine is then left pristine and unaffected by any misfortune.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Mar 2012
    Location
    Bowen Mountain, NSW, Australia
    Posts
    30

    Default Re: Problem with installation and updates of the GO language

    Quote Originally Posted by ndc33 View Post
    yes the opensuse install of go appears a mess.

    what do you mean by it cannot be removed? have you tried with zypper and can you present the cli dialogue.
    I have just tried removing with zypper with similar errors to removing with Yast.

    The following list of packages was obtained via the command "zypper info package:go*" with some editing:
    Name Version Repository
    go 1.9.4-33.1 openSUSE-Leap-42.3-Update
    go-race 1.9.4-33.1 openSUSE-Leap-42.3-Update
    go1.4 1.4.3-21.1 @System
    go1.4-doc 1.4.3-21.1 @System
    go1.4-race 1.4.3-21.1 @System
    go1.6-doc 1.6.4-20.1 @System
    go1.6-race 1.6.4-20.1 @System
    go1.7-doc 1.7.5-31.1 @System
    go1.7-race 1.7.5-31.1 @System
    go1.8-doc 1.8.5-11.1 @System
    go1.8-race 1.8.5-11.1 @System
    go1.9 1.9.4-6.1 @System
    go1.9-race 1.9.4-5.1 openSUSE-Leap-42.3-Update

    $ zypper remove go1.4 go1.4-doc go1.4-race go1.6-doc go1.6-race \
    go1.7-doc go1.7-race go1.8-doc go1.8-race go1.9 go1.9-race go go-race
    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...

    The following 14 packages are going to be REMOVED:
    go go go-race go1.4 go1.4-doc go1.4-race go1.6-doc go1.6-race go1.7-doc go1.7-race go1.8-doc go1.8-race go1.9
    go1.9-race

    14 packages to remove.
    After the operation, 388.8 MiB will be freed.
    Continue? [y/n/...? shows all options] (y): y
    ( 1/14) Removing go-1.9.2-30.1.x86_64 ..........................................................................[error]
    Removal of (341)go-1.9.2-30.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go-1.9.2-30.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 2/14) Removing go-race-1.9.4-33.1.x86_64 ......................................................................[done]
    ( 3/14) Removing go1.4-doc-1.4.3-21.1.x86_64 ...................................................................[error]
    Removal of (345)go1.4-doc-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-doc-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 4/14) Removing go1.4-race-1.4.3-21.1.x86_64 ..................................................................[error]
    Removal of (346)go1.4-race-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-race-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 5/14) Removing go1.6-doc-1.6.4-20.1.x86_64 ...................................................................[error]
    Removal of (347)go1.6-doc-1.6.4-20.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.6-doc-1.6.4-20.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 6/14) Removing go1.6-race-1.6.4-20.1.x86_64 ..................................................................[error]
    Removal of (348)go1.6-race-1.6.4-20.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.6-race-1.6.4-20.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 7/14) Removing go1.7-doc-1.7.5-31.1.x86_64 ...................................................................[error]
    Removal of (349)go1.7-doc-1.7.5-31.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.7-doc-1.7.5-31.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 8/14) Removing go1.7-race-1.7.5-31.1.x86_64 ..................................................................[error]
    Removal of (350)go1.7-race-1.7.5-31.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.7-race-1.7.5-31.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 9/14) Removing go1.8-doc-1.8.5-11.1.x86_64 ...................................................................[error]
    Removal of (351)go1.8-doc-1.8.5-11.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.8-doc-1.8.5-11.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    (10/14) Removing go1.8-race-1.8.5-11.1.x86_64 ..................................................................[error]
    Removal of (352)go1.8-race-1.8.5-11.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.8-race-1.8.5-11.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    (11/14) Removing go1.9-race-1.9.4-5.1.x86_64 ....................................................................[done]
    (12/14) Removing go-1.9.4-33.1.x86_64 ...........................................................................[done]
    (13/14) Removing go1.4-1.4.3-21.1.x86_64 .......................................................................[error]
    Removal of (344)go1.4-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    (14/14) Removing go1.9-1.9.4-6.1.x86_64 ........................................................................[error]
    Removal of (353)go1.9-1.9.4-6.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.9-1.9.4-6.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    Problem occurred during or after installation or removal of packages:
    Failed to cache rpm database (1).
    Please see the above error message for a hint.

    Three packages have actually been removed but Yast still shows "go 1.9.4-33.1" as installed.
    All the packages with the "RPM failed error" show the revision number in Yast either as RED or BLUE ??

    Zypper does not work any better - sorry I need more help.

  5. #5
    Join Date
    Mar 2012
    Location
    Bowen Mountain, NSW, Australia
    Posts
    30

    Default Re: Problem with installation and updates of the GO language

    Quote Originally Posted by tsu2 View Post
    It's possible to install only Go 1.9.
    But, if you do install multiple versions of "go" then you can switch between them easily (see below)

    The following is how I did this...

    Although probably not a critical option, because I intend to develop using the Go language and not just run pre-built Go applications, I recommend adding the Go language repository. You can do this using the YaST Software Repository management module or possibly zypper. Oddly, in this case my attempt using zypper failed for unknown reasons so I did this using YaST. The URL for the 42.3 Go repo is the following
    Code:
    http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_42.3/
    I then used YaST Software Manager, and did a search for go, found "Go 1.9" and checked the box for installation
    Side note:
    As long as I was using YaST Software Manager (I usually don't), I also checked Patterns (nothing go-related existed), Packages (no results), and RPM groups (Only Go 1.4 listed). So, these other "views" don't really fully work.

    After Checking "Go 1.9" I also noted packages for Go 1.8 and Go 1.7 were selected.
    I unchecked those boxes, deselecting those unwanted Go versions.

    Now, after clicking the "Accept" button to install the selected packages, the following Summary displayed



    Proceeding with the Install, the installation completed successfully displaying the following




    So,
    It's possible to install a specific version of Go without the other undesirable versions.

    But,
    If you do install multiple versions of Go on your system, it looks like you can use update-alternatives to switch between each installed version. To switch between go versions, run the following command and select what you want
    Code:
    update-alternatives --config go

    Now,
    To your current situation...

    From your description, I wonder if you installed the complete selection of Go packages... note in the first screenshot above that "Go 1.9" is the actual Go package you should install (the others are then selected automatically) but "Go 1.9-race" is <not> the complete package... It's only a collection of add-on functions to address race conditions.

    See if the following command runs, and post the result to see what packages are supposedly installed on your system
    Code:
    # zypper se -i 'go'
    BTW -
    Your situation might have been the result of a self-inflicted mistake but is not that uncommon when developing...
    It's a major reason why whenever possible I do all my development in virtual machines so that when the system is borked, I just disgard and fire up a new virtual machine (a copy of my development install and project so I don't have to re-install everything all over again).
    My physical machine is then left pristine and unaffected by any misfortune.

    TSU
    Thank you for your detailed Go installation instructions. I guessed I should have only selected 'go1.9' etc. Not knowing what to expect I selected 'go' and got all the early revisions which I cannot get rid of.

    # zypper se -i 'go'
    i+ | go | A compiled, garbage-collected, concurrent programming langu-> | package
    i+ | go1.4 | A compiled, garbage-collected, concurrent programming langu-> | package
    i+ | go1.4-doc | Go documentation | package
    i+ | go1.4-race | Go runtime race detector | package
    i+ | go1.6-doc | Go documentation | package
    i+ | go1.6-race | Go runtime race detector | package
    i+ | go1.7-doc | Go documentation | package
    i+ | go1.7-race | Go runtime race detector | package
    i+ | go1.8-doc | Go documentation | package
    i+ | go1.8-race | Go runtime race detector | package
    i+ | go1.9 | A compiled, garbage-collected, concurrent programming langu-> | package

    This is what is left after "zypper remove ..." in answer to nde33. The run-time for GO has been broken since my initial attempt to clean up and remove GO packages with Yast.

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,477
    Blog Entries
    2

    Default Re: Problem with installation and updates of the GO language

    Rebuild your package cache by first clearing with the following command
    Code:
    zypper clean --all
    Followed by
    Code:
    zypper ref
    Now, either use YaST Software Manager or zypper to search for, and see which go packages are installed on your system and remove.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Mar 2012
    Location
    Bowen Mountain, NSW, Australia
    Posts
    30

    Default Re: Problem with installation and updates of the GO language

    Quote Originally Posted by tsu2 View Post
    Rebuild your package cache by first clearing with the following command
    Code:
    zypper clean --all
    Followed by
    Code:
    zypper ref
    Now, either use YaST Software Manager or zypper to search for, and see which go packages are installed on your system and remove.

    TSU
    # zypper clean --all
    All repositories have been cleaned up.
    the response came instantaneously.

    # zypper ref
    Retrieving repository 'openSUSE-Leap-42.3-Non-Oss' metadata .....................................................[done]
    Building repository 'openSUSE-Leap-42.3-Non-Oss' cache ..........................................................[done]
    Retrieving repository 'openSUSE-Leap-42.3-Update' metadata ......................................................[done]
    Building repository 'openSUSE-Leap-42.3-Update' cache ...........................................................[done]
    Retrieving repository 'openSUSE-Leap-42.3-Update-Non-Oss' metadata ..............................................[done]
    Building repository 'openSUSE-Leap-42.3-Update-Non-Oss' cache ...................................................[done]
    Retrieving repository 'openSUSE-Leap42.3-Oss' metadata ..........................................................[done]
    Building repository 'openSUSE-Leap42.3-Oss' cache ...............................................................[done]
    All repositories have been refreshed.
    Refresh took about 5 minutes

    Using zypper again to make an attempt to remove all 11 GO packages now listed by Yast

    # zypper remove go1.4 go1.4-doc go1.4-race go1.6-doc go1.6-race \
    go1.7-doc go1.7-race go1.8-doc go1.8-race go1.9 go

    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...

    The following 11 packages are going to be REMOVED:
    go go1.4 go1.4-doc go1.4-race go1.6-doc go1.6-race go1.7-doc go1.7-race go1.8-doc go1.8-race go1.9

    11 packages to remove.
    After the operation, 388.5 MiB will be freed.
    Continue? [y/n/...? shows all options] (y): y
    ( 1/11) Removing go-1.9.2-30.1.x86_64 ..........................................................................[error]
    Removal of (341)go-1.9.2-30.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go-1.9.2-30.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 2/11) Removing go1.4-doc-1.4.3-21.1.x86_64 ...................................................................[error]
    Removal of (343)go1.4-doc-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-doc-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 3/11) Removing go1.4-race-1.4.3-21.1.x86_64 ..................................................................[error]
    Removal of (344)go1.4-race-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-race-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 4/11) Removing go1.6-doc-1.6.4-20.1.x86_64 ...................................................................[error]
    Removal of (345)go1.6-doc-1.6.4-20.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.6-doc-1.6.4-20.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 5/11) Removing go1.6-race-1.6.4-20.1.x86_64 ..................................................................[error]
    Removal of (346)go1.6-race-1.6.4-20.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.6-race-1.6.4-20.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 6/11) Removing go1.7-doc-1.7.5-31.1.x86_64 ...................................................................[error]
    Removal of (347)go1.7-doc-1.7.5-31.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.7-doc-1.7.5-31.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 7/11) Removing go1.7-race-1.7.5-31.1.x86_64 ..................................................................[error]
    Removal of (348)go1.7-race-1.7.5-31.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.7-race-1.7.5-31.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 8/11) Removing go1.8-doc-1.8.5-11.1.x86_64 ...................................................................[error]
    Removal of (349)go1.8-doc-1.8.5-11.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.8-doc-1.8.5-11.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    ( 9/11) Removing go1.8-race-1.8.5-11.1.x86_64 ..................................................................[error]
    Removal of (350)go1.8-race-1.8.5-11.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.8-race-1.8.5-11.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    (10/11) Removing go1.9-1.9.4-6.1.x86_64 ........................................................................[error]
    Removal of (351)go1.9-1.9.4-6.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.9-1.9.4-6.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    (11/11) Removing go1.4-1.4.3-21.1.x86_64 .......................................................................[error]
    Removal of (342)go1.4-1.4.3-21.1.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: error: package go1.4-1.4.3-21.1.x86_64 is not installed

    Abort, retry, ignore? [a/r/i] (a): i
    There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run 'zypper ps -s' to list these programs.

    Same errors as with previous attempts after zypper clean and zypper refresh

    The 11 RPM packages are obviously not installed. All I really want to do is to remove the names of these packages from the data-base which makes Yast/zypper assume they are installed. Is there any way of doing that. Clean and Refresh seem to ignore this inconsistency.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,477
    Blog Entries
    2

    Default Re: Problem with installation and updates of the GO language

    You can try some of the methods described in this long running thread on orphaned packages (display and removal).

    https://forums.opensuse.org/showthre...get-autoremove

    In any case whether you resolve this or not,
    IMO you can set up a working Go environment in a virtual machine, in fact I'd highly recommend not just for possibly avoiding any problems in your HostOS but to easily address this type of situation in the future.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Feb 2016
    Location
    Berlin
    Posts
    357

    Default Re: Problem with installation and updates of the GO language

    > You can try some of the methods described in this long running thread on orphaned packages

    these are not orphaned packages - incredibly this situation appears to be by 'design', see mailing list:

    [opensuse-factory] Different go versions in Tumbleweed https://lists.opensuse.org/opensuse-.../msg00921.html

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,477
    Blog Entries
    2

    Default Re: Problem with installation and updates of the GO language

    Quote Originally Posted by ndc33 View Post
    > You can try some of the methods described in this long running thread on orphaned packages

    these are not orphaned packages - incredibly this situation appears to be by 'design', see mailing list:

    [opensuse-factory] Different go versions in Tumbleweed https://lists.opensuse.org/opensuse-.../msg00921.html
    I don't know if there is a response in the mailing list, but the described GOROOT problem is likely only an update-alternatives lack of full configuration issue.

    Highly recommend you submit your problem as a bug to https://bugzilla.opensuse.org.
    Maybe even submit a bug relating to your mailing list reference(I don't see an existing bug in the bugzilla)
    and
    Install something like Virtualbox with an openSUSE Guest and install Go as I described.

    That way,
    You will have a fully working environment immediately so you won't be slowed down and whenever your problem might be fixed, that fix can be applied in the future.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •