fix ubuntu 22.04 install

This commit is contained in:
nahuhh 2024-01-30 09:52:48 -05:00
parent 4be6b3c549
commit a2dc857a8a
3 changed files with 9 additions and 9 deletions

View file

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
. $SWAP_DATADIR/venv/bin/activate && python -V . $SWAP_DATADIR/venv/bin/activate && python -V
./bsx/setup.sh /usr/local/bin/bsx/setup.sh

View file

@ -7,20 +7,17 @@ unzip -d coincurve-anonswap coincurve-anonswap.zip
mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true
cd $SWAP_DATADIR/coincurve-anonswap cd $SWAP_DATADIR/coincurve-anonswap
pip3 install . pip3 install .
## UBUNTU 22.04 FIX upgrade protobuf inside of venv
python3 -m pip install --upgrade "protobuf<=3.20.1"
## Clone basicswap git ## Clone basicswap git
cd $SWAP_DATADIR cd $SWAP_DATADIR
git clone https://github.com/tecnovert/basicswap.git git clone https://github.com/tecnovert/basicswap.git
cd $SWAP_DATADIR/basicswap cd $SWAP_DATADIR/basicswap
## Install basicswap ## Install basicswap
protoc -I=basicswap --python_out=basicswap basicswap/messages.proto protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
pip3 install . pip3 install .
# Move scripts to /usr/local/bin
cd $SWAP_DATADIR
sudo mv -f -t /usr/local/bin/ basicswap-bash bsx*
## Run basicswap-prepare with particl and monero ## Run basicswap-prepare with particl and monero
if [[ "$monerod_addr" && "$monerod_port" ]]; then if [[ "$monerod_addr" && "$monerod_port" ]]; then
# Use remote Monero node # Use remote Monero node

View file

@ -34,7 +34,11 @@ read -p 'Press any key to continue, or CTRL-C to exit.'
## Update & Install dependencies ## Update & Install dependencies
sudo apt update sudo apt update
sudo apt install -y git wget python3-full python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config curl jq ## python-is-python3 for ubuntu
sudo apt install -y git wget python-is-python3 python3-full python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config curl jq
# Move scripts to /usr/local/bin
sudo rm -r /usr/local/bin/bsx # Remove old
sudo mv -f -t /usr/local/bin/ basicswap-bash bsx* # Add new
## Make venv ## Make venv
export SWAP_DATADIR=$HOME/coinswaps export SWAP_DATADIR=$HOME/coinswaps
@ -42,6 +46,5 @@ export monerod_addr=$monerod_addr
export monerod_port=$monerod_port export monerod_port=$monerod_port
mkdir -p "$SWAP_DATADIR/venv" mkdir -p "$SWAP_DATADIR/venv"
python3 -m venv "$SWAP_DATADIR/venv" python3 -m venv "$SWAP_DATADIR/venv"
## Activate venv ## Activate venv
./bsx/activate_venv.sh /usr/local/bin/bsx/activate_venv.sh