Git Product home page Git Product logo

Comments (8)

DisposaBoy avatar DisposaBoy commented on June 17, 2024
  1. update your Go installation. See https://code.google.com/p/go/downloads/list or http://golang.org/doc/install
  2. Please set GOPATH and never go get anything as root or sudo. See http://golang.org/doc/code.html

from goquery.

mna avatar mna commented on June 17, 2024

Thanks @DisposaBoy !

from goquery.

olanmatt avatar olanmatt commented on June 17, 2024

I had run "go get" as sudo, and am now trying to fix my mistake. I have been at this for hours now, does anyone have any pointers? Thanks!

from goquery.

DisposaBoy avatar DisposaBoy commented on June 17, 2024

@olanmatt I'm guessing you haven't removed the files from your GOROOT. Packages inside GOROOT takes precedence over GOPATH, so you'll have to remove all third-party(non-go distrbuted) files and directories from there otherwise go get, etc. will just continue to try use them,

from goquery.

firebitsbr avatar firebitsbr commented on June 17, 2024

Thanks for the warning about the root user. In case it was just a PoC (Proof of Concept) in VirtualBox, but we have security vision, even :) I will do as you guided me. Thanks, guys :)

from goquery.

olanmatt avatar olanmatt commented on June 17, 2024

@DisposaBoy Thanks for the response! I managed to remove the package from GOROOT, but am still confused how I would go get without using sudo as I am getting permission denied. Is there a way to install the package I am missing? Thanks again.

from goquery.

mna avatar mna commented on June 17, 2024

You have to set your $GOPATH environment variable. I suggest you take the time to read the article that Disposaboy posted : http://golang.org/doc/code.html

It explains the setup required for a working Go environment. You'll want to point GOPATH to a directory that you have access (without root, that is).

from goquery.

miku avatar miku commented on June 17, 2024

On Ubuntu 13.04 with the go version in apt (1.0.2), I got the same error. sudo add-apt-repository ppa:duh/golang did not help, since the latest version was 1.1.1. I finally followed http://blog.labix.org/2013/06/15/in-flight-deb-packages-of-go, which will create a deb from a official package. With

$ godeb 1.1.2 # will create a .deb package for your platform
$ sudo apt-get purge golang-*
$ sudo dpkg -i go-VERSION-PLATFORM.deb

it's all fine and I have a fresh go version go1.1.2 linux/amd64 installation.

from goquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.