1

I am having trouble with installing the latest version of golang on Ubuntu 16.10. After running the sudo umake go command I get the message saying to choose the installation path with the default path suggested as /home/$user/.local/share/umake/go/go-lang. This does not appear to be what I want as typing in the go command afterwards gives me the message: The program 'go' is currently not installed. You can install it by typing: sudo apt install golang-go. However, using apt to install golang will only give me the older 1.6 version.

I have tried changing the installation path when using umake, but I then get a message that the directory specified will be deleted and everything in it replaced. I am not sure where to go from here. Thanks in advance.

After making sure I have the latest version (16.11.1) of umake I ran umake -r go. Then I tried again and ran umake go. This is the error message I got:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper function(*args, **kwargs) File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py", line 409, in decompress_and_install_done self.post_install() File "/usr/lib/python3/dist-packages/umake/frameworks/go.py", line 75, in post_install "GOROOT": {"value": self.install_path, "keep": False}}) File "/usr/lib/python3/dist-packages/umake/tools.py", line 450, in add_env_to_user with open(profile_filepath, "a", encoding='utf-8') as f: PermissionError: [Errno 13] Permission denied: '/home/$user/.profile'

After using umake to uninstall go I ran the sudo chown -R $USER /home/$USER command, but am still getting the same error when I then run umake go.

1 Answer 1

0

Reviewing umake documents

Installing umake on your system does required using sudo

However it is clear that running umake app-name should be done as regular user and not as root.

The proper command which should be executed in order to install go is:

umake go

If you already executed:

sudo umake go

You might need to remove the previous installation (which was done by sudo umake go) before running the umake go

Solving permission issues caused by sudo umake go

The source of the below error seems to be the execution of umake go as root.

PermissionError: [Errno 13] Permission denied: '/home/$user/.profile'

In order to solve it, please execute which will change the ownership of the files in your home-directory to be own by you.

assuming that thomas is your username, and /home/thomas is your home directory, the following should change the ownership of .profile to be thomas instead of root

sudo chown thomas /home/thomas/.profile
  • $USER variable should hold your username (you can replace the $USER in the command with your username)
7
  • @Thomas Lloyd - I've updated my answer - to solve the permission denied error
    – Yaron
    Mar 2, 2017 at 6:21
  • @Thomas Lloyd - did my answer helped you?
    – Yaron
    Mar 2, 2017 at 20:26
  • Afraid not. See latest edit. Mar 3, 2017 at 17:39
  • @ThomasLloyd - what is the result of ls -lsa /home/$user/.profile ?
    – Yaron
    Mar 6, 2017 at 11:52
  • 4 -rw-r--r-- 1 root root 1001 Mar 2 12:45 /home/thomas/.profile Mar 7, 2017 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .