theta-protocol-ledger icon indicating copy to clipboard operation
theta-protocol-ledger copied to clipboard

$GOPATH issue

Open vzhilov opened this issue 5 years ago • 10 comments

Hello, your installation directions are very detailed, thanks a lot for this. However I keep getting problems with $GOPATH variable related to git.

At the stage of

make tools

I had to replace all your git commands from this (for example):

git clone https://github.com/spf13/pflag $GOPATH/src/github.com/spf13/pflag

to that:

git clone https://github.com/spf13/pflag $(cygpath -u $GOPATH)/src/github.com/spf13/pflag

as otherwise I was getting an error on invalid path fatal: Invalid path

/cygdrive/c/Users/user1/C:\Users\user1\go': No such file or directory

But the at stage of

glid make

I gave up as I couldn't figure out how to fix those:

[WARN] Unable to checkout github.com/aerospike/aerospike-client-go [ERROR] Update failed for github.com/aerospike/aerospike-client-go: Unable to get repository: Copying to «C:\Users\user1.glide\cache\src\https-github.com-aerospike-aerospike-client-go»… fatal: Invalid path '/cygdrive/c/Users/user1/go/src/github.com/thetatoken/ukulele/C:\Users\user1.glide\cache\src\https-github.com-aerospike-aerospike-client-go': No such file or directory : exit status 128

Same error with each single dependacy.

vzhilov avatar Dec 30 '18 12:12 vzhilov

@vzhilov which OS you are using? (Windows, MacOS or Linux)

Yoruba avatar Feb 27 '19 12:02 Yoruba

Windows Server 2012 R2

vzhilov avatar Feb 27 '19 14:02 vzhilov

@vzhilov there is one step missing in the documentation.

You need to create a go folder in the Users\username

mkdir %USERPROFILE%\go

You can check if the GOPATH can be found with the following command in the Cygwin console.

echo $GOPATH

It must return c:\Users\username\go

Let me know if you need more help.

Yoruba avatar Feb 27 '19 20:02 Yoruba

Yes, I have that.

I think the problem starts here:

$ git clone [email protected]:thetatoken/theta-protocol-ledger.git $GOPATH/src/github.com/thetatoken/theta

fatal: Invalid path '/cygdrive/c/Users/user/C:\Users\user\go': No such file or directory

vzhilov avatar Mar 09 '19 16:03 vzhilov

@vzhilov did you following this step?

To set the the Cygwin terminal home director to the %UserProfile% location, open the nsswitch.conf in the C:\cygwin64\etc folder. And set the db_home location to windows as below.

db_home:  windows

After running the command

git clone [email protected]:thetatoken/theta-protocol-ledger.git $GOPATH/src/github.com/thetatoken/theta

You have to see a path like

Cloning into 'C:\Users\user\go/src/github.com/thetatoken/theta

An other way is just use this command

git clone [email protected]:thetatoken/theta-protocol-ledger.git /c/Users/user/src/github.com/thetatoken/theta

Yoruba avatar Mar 10 '19 11:03 Yoruba

Yes, I did that. But my Cygwin is at

C:\tools\cygwin

That’s how it got installed by default. Can that be a problem? I can move this manually to C:\cygwin I guess

vzhilov avatar Mar 10 '19 14:03 vzhilov

@vzhilov

C:\tools\cywin is ok.

nsswitch config file is then in

C:\tools\cygwin\etc folder

Yoruba avatar Mar 11 '19 07:03 Yoruba

Still getting

fatal: Invalid path '/cygdrive/c/Users/user/C:\Users\user\go': No such file or directory

Seems like it doesn’t see that setting

vzhilov avatar Mar 20 '19 15:03 vzhilov

@vzhilov

Check if the Enviroment Variables for GOPATH and GOROOT are correctly set. If it still doesn't work can you show the nsswitch.conf in the C:\cygwin64\etc folder.

image

Yoruba avatar Mar 20 '19 19:03 Yoruba

@vzhilov do you still have problems?

If not can you please close this issue?

Thanks

Yoruba avatar Jan 18 '20 16:01 Yoruba