GithubHelp home page GithubHelp logo

Comments (3)

Jiab77 avatar Jiab77 commented on June 14, 2024

@sidahmed-malaoui, I think you are right but I've spotted another issue that I need to discuss with @kotakanbe, the following lines are wrong as the file .profile is not loaded but the file .bash_profile instead:

echo "export GOROOT=/usr/local/go" >> "$HOME"/.profile;
echo "export GOPATH=$HOME/go" >> "$HOME"/.profile;
echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> "$HOME"/.profile;

and should be replaced by:

echo "export GOROOT=/usr/local/go" >> $HOME/.bash_profile
echo "export GOPATH=$HOME/go" >> $HOME/.bash_profile
echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> $HOME/.bash_profile

Another thing that should be cleaned in the script is the leading ; at the end of the lines, it is useless in bash for running a single command.

from vulsctl.

Jiab77 avatar Jiab77 commented on June 14, 2024

@kotakanbe, here is the patching code I'm currently testing for the install-host/upgrade.sh script:

# Dirty GO missing variables patch
if [[ -f $HOME/.profile ]]; then
	source $HOME/.profile
else
	source $HOME/.bash_profile
fi

Let me know what you prefer and I can do the required changes.

from vulsctl.

sudnonk avatar sudnonk commented on June 14, 2024

I agree with this issue.
In my case, on CentOS, I installed golang via yum and they placed go at /usr/lib/golang/bin.
However, as it has mentioned in this issue, the script changes GOROOT, then make install in later part can't find the directory /usr/local/go.
I solved simply just comment out line 9-11.

from vulsctl.

Related Issues (18)

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.