Pages:
Author

Topic: Questions RE: setting up Lightning Node on Raspberry Pi with Stadicus' guide - page 2. (Read 22082 times)

member
Activity: 112
Merit: 17
Hmm, I created those folders and tried to download Zap again with using sudo at the beginning (sudo go get -d github.com/LN-Zap/zapconnect) but now getting the original error message (package github.com/LN-Zap/zapconnect: cannot download, $GOPATH not set. For more details see: go help gopath)

Try running that command without sudo. Also, check what has happened to $GOPATH by typing in go env. If it has changed then use the previous two echo commands to set it again.

When I try downloading Zap without sudo I get the other error (package github.com/LN-Zap/zapconnect: mkdir /home/admin/go/src/github.com: permission denied). I checked environment details again and they look to be the same, details below.

Code:
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/admin/go"
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_arm"
CC="gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build473268620=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
legendary
Activity: 1876
Merit: 3132
Hmm, I created those folders and tried to download Zap again with using sudo at the beginning (sudo go get -d github.com/LN-Zap/zapconnect) but now getting the original error message (package github.com/LN-Zap/zapconnect: cannot download, $GOPATH not set. For more details see: go help gopath)

Try running that command without sudo. Also, check what has happened to $GOPATH by typing in go env. If it has changed then use the previous two echo commands to set it again.
member
Activity: 112
Merit: 17
I then proceeded to try and download Zap Connect but now get the following output

Code:
package github.com/LN-Zap/zapconnect: mkdir /home/admin/go/src: permission denied

It looks like Go requires three more folders to work. Use sudo mkdir ~/go/bin ~/go/src ~/go/pkg. You can also run all the commands from Zap connect with sudo in the beginning just in case.

Hmm, I created those folders and tried to download Zap again with using sudo at the beginning (sudo go get -d github.com/LN-Zap/zapconnect) but now getting the original error message (package github.com/LN-Zap/zapconnect: cannot download, $GOPATH not set. For more details see: go help gopath)

legendary
Activity: 1876
Merit: 3132
I then proceeded to try and download Zap Connect but now get the following output

Code:
package github.com/LN-Zap/zapconnect: mkdir /home/admin/go/src: permission denied

It looks like Go requires three more folders to work. Use sudo mkdir ~/go/bin ~/go/src ~/go/pkg. You can also run all the commands from Zap connect with sudo in the beginning just in case.
member
Activity: 112
Merit: 17
That worked correctly this time so I continued to check the environment variables with input "go env" and noticed my output didn't match up with the guide

Some of the environment variables must be different in this case. Try the following commands

sudo mdkir ~/go
echo 'export GOPATH=$HOME/go' >> ~/.profile
echo 'PATH="$HOME/go/bin:$PATH"' >> ~/.profile

Log out, connect again to your machine and then run go env to see whether or not GOPATH has changed. If so, try the command from Zap connect.

Ok followed those steps and the GOPATH was successfully changed. I get the following environment config now

Code:
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/admin/go"
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_arm"
CC="gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build354012546=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

I then proceeded to try and download Zap Connect but now get the following output

Code:
package github.com/LN-Zap/zapconnect: mkdir /home/admin/go/src: permission denied
legendary
Activity: 1876
Merit: 3132
That worked correctly this time so I continued to check the environment variables with input "go env" and noticed my output didn't match up with the guide

Some of the environment variables must be different in this case. Try the following commands

sudo mdkir ~/go
echo 'export GOPATH=$HOME/go' >> ~/.profile
echo 'PATH="$HOME/go/bin:$PATH"' >> ~/.profile

Log out, connect again to your machine and then run go env to see whether or not GOPATH has changed. If so, try the command from Zap connect.
member
Activity: 112
Merit: 17
I guess that you needn't have looked at the environment variables (go env) since it was installed in a different way. You should have moved on to the Zap connect part. Let's try to fix that. Type in the following commands.

sudo rm -r /usr/local/go - to make sure that the folder you have moved is completely deleted
sudo apt-get remove golang - completely getting rid of everything related to the Go. I don't think that purge command is necessary here.
sudo apt-get install golang

Please, let me know if this has worked for you. I am going to bed soon.

Edit: Oh, you have just changed your post. I will answer it in a moment.

Yes please disregard the original post, the edited version is where I'm at now
legendary
Activity: 1876
Merit: 3132
I guess that you needn't have looked at the environment variables (go env) since it was installed in a different way. You should have moved on to the Zap connect part. Let's try to fix that. Type in the following commands.

sudo rm -r /usr/local/go - to make sure that the folder you have moved is completely deleted
sudo apt-get remove golang - completely getting rid of everything related to the Go. I don't think that purge command is necessary here.
sudo apt-get install golang

Please, let me know if this has worked for you. I am going to bed soon.

Edit: Oh, you have just changed your post. I will answer it in a moment.
member
Activity: 112
Merit: 17
Will definitely try the second suggestion if the first one fails! What exactly does that command do? (sudo apt-get install golang)

sudo apt-get install golang automatically installs Go and other dependencies in case they are needed on your system. I wonder why it isn't mentioned in the tutorial. There is a slight chance that the repository won't be available for your OS (I can't recall which version it was) and the whole installation will fail. If you don't want to play around with the 32 bit version then you can try using this command first.

Ok I was able to revert back and reinstall Go and other dependencies with the command you suggested. After that I skipped back down to the Verify Go Installation section and entered input "go version". That worked correctly this time so I continued to check the environment variables with input "go env" and noticed my output didn't match up with the guide, so I backtracked to the beginning of the guide and moved the go folder again to /usr/local which gave the following error

Code:
mv: cannot stat 'go': No such file or directory

I skipped ahead assuming the folder was already moved and went to resetup the environment. After each command I noticed nothing really happens. When I check the environment details again I still see nothing has changed. I get the following output


Code:
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_arm"
CC="gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build033723346=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

I decided to skip ahead all the way to the Zap Connect section to see if it allows me to download this time. I get the following output which leads me to believe the environment is still not setup correctly.

Code:
package github.com/LN-Zap/zapconnect: cannot download, $GOPATH not set. For more details see: go help gopath

Sorry for all the confusion  Huh
legendary
Activity: 1876
Merit: 3132
Will definitely try the second suggestion if the first one fails! What exactly does that command do? (sudo apt-get install golang)

sudo apt-get install golang automatically installs Go and other dependencies in case they are needed on your system. I wonder why it isn't mentioned in the tutorial. There is a slight chance that the repository won't be available for your OS (I can't recall which version it was) and the whole installation will fail. If you don't want to play around with the 32 bit version then you can try using this command first.
member
Activity: 112
Merit: 17
What do you mean by reverting everything though? How would I do that?

In this case, it means that you have to get rid of the version that you have currently installed. You can do it easily by typing in sudo rm -r /usr/local/go because you have installed it manually. If you get 'Unknown directory error' or something similar then you must have done something wrong in the first place. Don't forget about the second suggestion if the first one doesn't work for you.

Will definitely try the second suggestion if the first one fails! What exactly does that command do? (sudo apt-get install golang)
legendary
Activity: 1876
Merit: 3132
What do you mean by reverting everything though? How would I do that?

In this case, it means that you have to get rid of the version that you have currently installed. You can do it easily by typing in sudo rm -r /usr/local/go because you have installed it manually. If you get 'Unknown directory error' or something similar then you must have done something wrong in the first place. Don't forget about the second suggestion if the first one doesn't work for you.
member
Activity: 112
Merit: 17
There are two things that I would try if I were you:

1) Download the 32 bit version of Go instead of the 64 bit one. https://dl.google.com/go/go1.11.4.linux-386.tar.gz

2) If the first suggestion doesn't work then use the following command sudo apt-get install golang

Don't forget to revert everything you have done so far before trying out each of these.

Hey BitCryptex, appreciate the response as always!

I'll try downloading the 32bit version when I get home, definitely good call on that. What do you mean by reverting everything though? How would I do that?
legendary
Activity: 1876
Merit: 3132
There are two things that I would try if I were you:

1) Download the 32 bit version of Go instead of the 64 bit one. https://dl.google.com/go/go1.11.4.linux-386.tar.gz

2) If the first suggestion doesn't work then use the following command sudo apt-get install golang

Don't forget to revert everything you have done so far before trying out each of these.
member
Activity: 112
Merit: 17
Any ideas?

Try installing Go automatically by typing in sudo apt-get install golang. You must have done something wrong during the manual installation.

Edit:

I'm assuming I would skip straight to the "Zap Connect" section since everything before that seems to be instructions on setting up a node.

Ah, you shouldn't have skipped that much. The skipped part describes the installation process of LND and Go which is necessary.

Ah well that would explain it. I went back to the beginning, starting with section "Downloading Go" and was able to breeze through everything until I hit "Verify Go Installation". When I enter "go version" I get the following output

Code:
-bash: /usr/local/go/bin/go: cannot execute binary file: Exec format error

I tried reinstalling and going through the same steps but get the same issue. Any idea on went wrong?
legendary
Activity: 1876
Merit: 3132
Any ideas?

Try installing Go automatically by typing in sudo apt-get install golang. You must have done something wrong during the manual installation.

Edit:

I'm assuming I would skip straight to the "Zap Connect" section since everything before that seems to be instructions on setting up a node.

Ah, you shouldn't have skipped that much. The skipped part describes the installation process of LND and Go which is necessary.
member
Activity: 112
Merit: 17
Hey all, I'm back with another question. I'm trying to setup the Zap iOS wallet with my node but having trouble generating a QR code through LND. I'm following the guide below...

https://ln-zap.github.io/zap-tutorials/iOS-remote-node-setup.html

I'm assuming I would skip straight to the "Zap Connect" section since everything before that seems to be instructions on setting up a node. When I try downloading Zap Connect with LND, I put in command "go get -d github.com/LN-Zap/zapconnect" per the instructions but get "-bash: go: command not found" as an output.

Any ideas?
newbie
Activity: 4
Merit: 0
Ah! @BitCryptex! thanks! I didn’t get info about your reply in the first place  Huh sorry.
And was almost afraid my question was to dumb.

good thing about it:
I found out myself, that I ran LND with this autopilot config, —which as it happens— uploads 60% of total balance and opens up to 5 channels automatically! At least the balance question is solved. Smiley

Code:
# RaspiBolt: lnd configuration
# /home/bitcoin/.lnd/lnd.conf

[Application Options]
debuglevel=info
maxpendingchannels=5
alias=YOUR_NAME [LND]
color=#68F442

# Your router must support and enable UPnP, otherwise delete this line  
nat=true

[Bitcoin]
bitcoin.active=1

# enable either testnet or mainnet
bitcoin.testnet=1
#bitcoin.mainnet=1

bitcoin.node=bitcoind

[autopilot]
autopilot.active=1
autopilot.maxchannels=5
# here ist the 60% thingy!
autopilot.allocation=0.6

So as I get it, I have now locked this ~0.06 locked up in my channel — while the rest (~0.039) is still in my wallet.

Edited:
Of course I messed up the zeros: must be ~0.0006 and ~0.00039
legendary
Activity: 1876
Merit: 3132
I was thinking that there was some kind of autopilot thingy but maybe only for opening/searching channels?
sorry. completely new to all of this magic.

Actually, there is an autopilot and it might have just worked for you. According to this transaction, your address 2N5gfEWg4nMU1DS4uLRwqwCQfG8Yym3Jf7m received exactly 0.001 BTC. These coins were almost immediately split between two native SegWit addresses. This suggests that the autopilot has funded a channel for you. Use the following command to check whether or not your payment channel is active:

lncli listchannels

If there is anything listed there then you can try to pay for something over the Lightning Network because your transaction has already more than 6 confirmations.
newbie
Activity: 4
Merit: 0
thanks for lightning fast reply! Wink
since i am not even sure what a transaction-id is but here is the link
https://testnet.smartbit.com.au/tx/ee1755b974cbc8dfb8b673336973f0b0306cb34f6a10d49a82a1abc6076b59ae

If you executed only these three commands then you didn't open any channel. You have just funded on-chain wallet of your Lightning Network node. In order to open a channel, you have to execute the following commands:

I was thinking that there was some kind of autopilot thingy but maybe only for opening/searching channels?
sorry. completely new to all of this magic.


Pages:
Jump to: