Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
0
answers
578
views
Help with zsh: command not found
Attempting to [follow these instructions][1] and I'm receiving error `zsh: command not found: ord` when attempting to do anything in `ord`, including `ord wallet create`. Currently running ohmyzsh and have not altered the .zshrc file. When I use echo $PATH, I receive `/Library/Frameworks/Python.fram...
Attempting to follow these instructions and I'm receiving error
zsh: command not found: ord
when attempting to do anything in ord
, including ord wallet create
. Currently running ohmyzsh and have not altered the .zshrc file.
When I use echo $PATH, I receive /Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
I'm new to this, so my apologies if the answer is obvious. Any help would be greatly appreciated.


MrP
(1 rep)
Feb 9, 2023, 03:51 PM
• Last activity: Feb 19, 2023, 12:46 PM
0
votes
1
answers
250
views
Dependencies of Electrum bitcoin wallet in different distros
What are the Dependencies of Electrum bitcoin wallet in different distros? 1. void 2. opensuse-tumbleweed 3. opensuse-leap 4. nethunter 5. fedora 6. centos 7. backbox 8. arch 9. alpine I know it's the same in these three distros: ubuntu kali debian ``` $ sudo apt-get install python3-pip python3-pyqt...
What are the Dependencies of Electrum bitcoin wallet in different distros?
1. void
2. opensuse-tumbleweed
3. opensuse-leap
4. nethunter
5. fedora
6. centos
7. backbox
8. arch
9. alpine
I know it's the same in these three distros:
ubuntu
kali
debian
$ sudo apt-get install python3-pip python3-pyqt5 libsecp256k1-0 python3-cryptography python3-setuptools libcairo2-dev
pkg-config python3-dev -y && sudo python3 -m pip install pycairo
user487583
(128 rep)
Sep 9, 2021, 04:43 AM
• Last activity: Sep 9, 2021, 11:32 AM
0
votes
0
answers
485
views
Can I use systemd's StateDirectory to point to an external hard drive?
I noticed that I am unable to change the StateDirectory of a [blockchain](https://github.com/bitcoin/bitcoin/blob/999f8b24cca3ea3f2e19773adda4554b7e40de0c/contrib/init/bitcoind.service#L55) to an external hard drive because I believe that systemd only allows relative paths for the StateDirectory opt...
I noticed that I am unable to change the StateDirectory of a [blockchain](https://github.com/bitcoin/bitcoin/blob/999f8b24cca3ea3f2e19773adda4554b7e40de0c/contrib/init/bitcoind.service#L55) to an external hard drive because I believe that systemd only allows relative paths for the StateDirectory option. The reason I want to use an external hard drive is that my service's state is notoriously large. Specifically, I want to use it to store the bitcoin blockchain.
Should I simply forget about using a StateDirectory, or is there some other option? Or, do I have an incorrect concept of how to use StateDirectory entirely?
mpls
(101 rep)
Aug 21, 2021, 11:15 AM
0
votes
1
answers
220
views
Installing bitcoin-core in Arch Linux (VirtualBox) returns: unknown location(0): fatal error: in runtime error: _S_create_c_locale name not valid
I'd like to maintain a BTC node / wallet on a VM within VirtualBox. For this I installed Arch Linux, manually. The process wasn't the smoothest experience, but I got it working, eventually. Then I used [this guide][1] to install _yay_, successfully. I went ahead and tried to install _bitcoin-core_ b...
I'd like to maintain a BTC node / wallet on a VM within VirtualBox. For this I installed Arch Linux, manually. The process wasn't the smoothest experience, but I got it working, eventually. Then I used this guide to install _yay_, successfully.
I went ahead and tried to install _bitcoin-core_ by running
yay -Sa bitcoin-core --answerclean y --answerdiff n
.
The installation takes long and fails, eventually. After a lot of lines starting with CXX
I got these lines:
==> Starting check()...
-> Testing ...
Making check in src
make[1] : Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[2] : Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0'
make: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0'
make check-TESTS check-local
...
make: Entering directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
==================================================================================
Running tests: arith_uint256_tests from test/arith_uint256_tests.cpp
Running 11 test cases...
Entering test module "Bitcoin Core Test Suite"
test/arith_uint356_tests.cpp(18): Entering test suite "arith_uint256_tests"
test/arith_uint256_tests.cpp(68(: Entering test case "basics"
2021-04-12T19:57:00 Seed: Setting random seed for current tests to RANDOM_CTX_SEED=........
2021-04-12T19:57:00 [test] Bitcoin Core version v0.21.0.0-d79e0e2 (release build)
2021-04-12T19:57:00 [test] Assuming ancestors of block .....................
unknown location(0): fatal error: in "arith_uint356_tests/basics": std::runtime_error: locale::facet::_S_create_c_locale name not valid
test/arith_uint256_tests.cpp(68): last checkpoint: "basics" fiture ctor
test/arith_uint256_tests.cpp(68): Leaving test case "basics"; testing time 789us
test/arith_uint256_tests.cpp(157): Entering test case "shifts"
test_bitcoin: util/system.cpp:519: void ArgsManager::AddArg(const string&, const string&, unsighed int, const OptionsCategory&): Assertion 'ret.second' failed.
make: *** [Makefile:21241: test/aerith_uint256_tests.cpp.test] Error 1
make: Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[2] : *** [Makefile:19663: test/aerith_uint256_tests.cpp.test] Error 1
make[2] : Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make[1] : *** [Makefile:19348: test/aerith_uint256_tests.cpp.test] Error 1
make[1] : Leaving directory '/home/user/.cache/yay/bitcoin-core/src/bitcoin-0.21.0/src'
make: *** [Makefile:803: check-recursive] Error 1
==> ERROR: A failure occurred in check().
Aborting...
The relevant line seems to be unknown location(0): fatal error: in "arith_uint356_tests/basics": std::runtime_error: locale::facet::_S_create_c_locale name not valid
.
The only similar issue I found was from this question and the solution makes sense. However, the contents of my /etc/locale.conf
are:
LANG=en_US.UTF-8
I also run locale-gen
before and edited my /etc/locale.gen
to only have en_US.UTF-8 UTF-8
active (not commented).
How can I get past this issue?
Martin Braun
(287 rep)
Apr 12, 2021, 09:02 PM
• Last activity: Apr 15, 2021, 03:13 PM
6
votes
2
answers
3138
views
Ledger Nano S on Arch Linux - Chrome app will not recognize device
I am running Arch Linux 64 bit - 4.13.8-1 I tried Ledger's [fix][1] by adding udev rules and changing owner: "OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl" "OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", AT...
I am running Arch Linux 64 bit - 4.13.8-1
I tried Ledger's fix by adding udev rules and changing owner:
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
"OWNER="USER", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2c97"
"OWNER="USER", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2581"ess", TAG+="udev-acl"
HW File:
-rw-r--r-- 1 USER users 1386 Oct 28 13:43 20-hw1.rules
The device does show up with dmesg -w:
hid-generic 0003:2C97:0001.003A: hiddev1,hidraw9: USB HID v1.11 Device [Ledger Nano S] on usb-0000:00:14.0-6/input0
Yet I cannot get the Ledger Manager or Wallet to recognize my Ledger. What am I missing here?
thewooster
(303 rep)
Oct 29, 2017, 10:54 PM
• Last activity: Apr 1, 2020, 05:02 PM
0
votes
1
answers
302
views
How to read all strings of a certain length into shell variables named sequentially?
I was wondering if there was code to find every string of a certain length in a text file and save each one as a new variable? For example, there are 5 strings in a text file. Two of them are 3 characters long. The idea is to parse out all the strings which are 8 characters long and put them in vari...
I was wondering if there was code to find every string of a certain length in a text file and save each one as a new variable?
For example, there are 5 strings in a text file. Two of them are 3 characters long. The idea is to parse out all the strings which are 8 characters long and put them in variables going in sequential order, e.g.
To view more info on bitcoin addresses, and to see what characters they consist of, visit the website on bitcoin addresses here
var1
, var2
, var3
.
How would I make this?
Thanks!
(For those wondering, I found an old file on my PC with a bunch of bitcoin wallets with private keys, trying to save them all as variables to check their balances.)
To view more info on bitcoin addresses, and to see what characters they consist of, visit the website on bitcoin addresses here
ETHguy
(1 rep)
Mar 2, 2020, 04:03 PM
• Last activity: Mar 3, 2020, 06:11 PM
1
votes
2
answers
2417
views
How to install Electrum 2.6.4 bitcoin wallet on Mint 18
Today's question of mine was **How do I install Electrum 2.6.4** Bitcoin wallet on my Linux Mint 18.
Today's question of mine was **How do I install Electrum 2.6.4** Bitcoin wallet on my Linux Mint 18.
Vlastimil Burián
(30515 rep)
Apr 9, 2016, 04:40 PM
• Last activity: Aug 9, 2019, 02:30 AM
1
votes
1
answers
117
views
Can't see a directory that's supposed to exist
So I own a device (casa node) which is basically a raspberry pi 3b+ with a hard drive and a modified OS (they call it CasaOS) and I want to edit a file. I found the location of this file by looking at the debug logs of the program that uses it. here's what they look like: 2019-01-05T22:11:44Z Bitcoi...
So I own a device (casa node) which is basically a raspberry pi 3b+ with a hard drive and a modified OS (they call it CasaOS) and I want to edit a file. I found the location of this file by looking at the debug logs of the program that uses it. here's what they look like:
2019-01-05T22:11:44Z Bitcoin Core version v0.17.0 (release build)
2019-01-05T22:11:44Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrel$2019-01-05T22:11:44Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 hav$2019-01-05T22:11:44Z Setting nMinimumChainWork=0000000000000000000000000000000000000000028822fef1c230963535a90d
2019-01-05T22:11:44Z Using the 'standard' SHA256 implementation
2019-01-05T22:11:44Z Default data directory /root/.bitcoin
2019-01-05T22:11:44Z Using data directory /usr/local/casa/chains/bitcoind/data/
2019-01-05T22:11:44Z Using config file /usr/local/casa/chains/bitcoind/conf/bitcoin.conf
The
bitcoin.conf
is the on I'm after, however I can't get in the directory. Once I'm in /usr/local/casa
I can't see or cd
into the chains
dir. the ls -a
command returns
. .. applications launch.sh
How can I get in the chains folder and ultimately to the bitcoin.conf
file? I did all of this as root.
Relaxo143
(11 rep)
Apr 4, 2019, 09:27 PM
• Last activity: Apr 6, 2019, 08:12 PM
1
votes
0
answers
588
views
Storing values from loop and comparing them every time run the script
### Description Hello, I'm trying to loop over certain commands and save their outputs into a file, and while looping through those commands, also check the file which we saved their outputs so we can compare them from the file while looping the commands at the same time. In the end, check if the lo...
### Description
Hello,
I'm trying to loop over certain commands and save their outputs into a file, and while looping through those commands, also check the file which we saved their outputs so we can compare them from the file while looping the commands at the same time. In the end, check if the looped commands' outputs match with the previously saved outputs in that file. *(Also check if the file doesn't contain the output and add it into the file so we can later use it to compare again)*
This is my main script which loops through the said commands which are located inside
/usr/local/bin/
so I can run them directly from the shell.
#!/bin/bash
wallets=find /usr/local/bin/ -iname '*-cli'
for i in $wallets; do
current_blocks=$I getblockcount
coin_name=${i:15:-4} # I use :15:-4
here to cut the path and the last 4 characters. (For example it's /usr/local/bin/bitcoin-cli
so I change it to bitcoin
only
echo $coin_name $current_blocks
echo $coin_name $current_blocks >> blocks.log
done
And this echo gives us exactly this (assuming there are 2 items in the $wallets
;
bitcoin 1457824
litecoin 759345
And this is the while loop I will -presumably- be using to read from the file;
while read line ; do
set $line
echo $1 $2
done = "$2" )); then
echo "Current blocks are greater than the saved blocks"
echo "Saving the new blocks count now"
sed -i "s/$1/$1 $current_blocks/" blocks.log
else
echo "Current blocks are less than or equals to saved blocks"
fi
else
echo "File does not contain the coin_name, adding it now"
echo "$coin_name $current_blocks" >> blocks.log
fi
done = "$2" )); then
echo "Current blocks are greater than the saved blocks"
echo "Saving the new blocks count now"
# sed -i "s/$1/$1 $current_blocks/" blocks.log
else
echo "Current blocks are less than or equals to saved blocks"
fi
else
echo "File does not contain the coin_name, adding it now"
echo "$coin_name $current_blocks" >> blocks.log
fi
done
What am I doing wrong?
Marry Jane
(151 rep)
Feb 19, 2019, 09:45 PM
• Last activity: Feb 19, 2019, 11:19 PM
0
votes
1
answers
416
views
Cron is not echoing correct value inside cron but outside works fine
I even included `source /home/user/.bashrc; ` in crontab, still it does not output correct thing. I have a while loop in my script which checks some value from a service called zend. It is like bitcoind but for Zen. The function looks like this, I put it [here][1] `check_existing_balance_withoutfl`...
I even included
source /home/user/.bashrc;
in crontab, still it does not output correct thing.
I have a while loop in my script which checks some value from a service called zend. It is like bitcoind but for Zen. The function looks like this, I put it here check_existing_balance_withoutfl
should be greater than 0 but it is saying that it is 0 when I run from cron.
{
declare -i bal;
bal=0
while [ $bal -le 1 ]
do
# #code to send zen to z addresses
echo "Balance is $check_t_balance";
logger "Balance is $check_t_balance";
sleep 5
# This following line is essential at this particular place
export_address=$(zen-cli listaddresses | jq -r '.');
if python -c "import sys; sys.exit(0 if float($check_t_balance) = float($min_ask_zen) else 1)";
# if [ $(bc = $min_ask_zen") -eq 1 ];
then
#statements
echo "ZEN balance is sufficient"
echo
echo "We have received $check_t_balance zen in $export_address this t address"
echo
echo "Now, this will be sent to two z-addresses" && echo
logger "Now, this will be sent to two z-addresses" && echo
# # Recommended tx_fee is >= 0.0001
# # Increse here if needed
# tx_fee=0.0001;
amt_aft_txfee=$(python -c "print(float($check_t_balance-$tx_fee))");
amt=$(python -c "print(float($amt_aft_txfee/2))");
echo "Sending now.... $amt ZEN to two z addresses"
topUpzksnark;
# # zen-cli z_sendmany $new_imported_address '[{"address": "'$(zen-cli z_getnewaddress)'", "amount": $amt},{"address": "'$(zen-cli z_getnewaddress)'", "amount": $amt}]';
echo "$amt ZEN is sent to two Z addresses"
else
echo "ZEN balance is not suffiecient"
moreZentoSend=$(python -c "print(float($min_ask_zen-$check_t_balance))")
echo "Please send at least $moreZentoSend Zen to $export_address this address" >> /home/rock64/log.txt
logger "Please send at least "$moreZentoSend" Zen to "$export_address" this address"
echo "bal is $bal" >> /home/rock64/log.txt
fi
declare -i bal;
declare -i check_existing_balance_withoutfl;
echo "check_existing_balance_withoutfl is $check_existing_balance_withoutfl" >>/home/rock64/log.txt;
check_existing_balance_withoutfl=$(zen-cli z_gettotalbalance | grep total | tr -d '," ' | cut -d ':' -f2 | tr -d '.' | bc);
# check_existing_balance_withoutfl=$((10#$(zen-cli z_gettotalbalance | grep total | tr -d '," ' | cut -d ':' -f2 | tr -d '.')));
# check_existing_balance_withoutfl=$((10#$check_existing_balance_withoutfl));
bal+=$check_existing_balance_withoutfl;
echo "check_existing_balance_withoutfl is $check_existing_balance_withoutfl" >>/home/rock64/log.txt;
echo "bal is $bal after if else" >>/home/rock64/log.txt
done
}
logs when sudo crontab -e
used with 55 8 * * * source /home/rock64/.bashrc; /home/rock64/light.sh > /home/rock64/both.log 2>&1
>
check_existing_balance_withoutfl is 0
bal is 0 after if else
There is not enough balance in the node T Address
check_existing_balance_withoutfl is 0
check_existing_balance_withoutfl is 0
bal is 0 after if else
If I run the script not from crontab, everything works normal as usual.
$ check_existing_balance_withoutfl=$(zen-cli z_gettotalbalance | grep total | tr -d '," ' | cut -d ':' -f2 | tr -d '.' | bc)
rock64@cheese:~$ echo $check_existing_balance_withoutfl
498
Why bal is not 498 then, when it was executed from cron? I have literally no idea, what is wrong I am doing.
After looking at the bash -x
log as suggested by @Marcel, it seems, I found the problem. Since, I put my script in crontab -e
, it was referring to a config file in /home/root/.zen directory, so for the zend client I had to replace all zen-cli
lines with zen-cli -conf=/home/user/.zen/zen.conf
in my script. Same applies to bitcoind
, if someone ever wants to put bitcoin-cli
in crontab to check some specific transactions or whatever.
Rakib Fiha
(650 rep)
Feb 15, 2019, 09:05 AM
• Last activity: Feb 15, 2019, 12:49 PM
0
votes
1
answers
114
views
Trying to find better way to read BTC price from specific exchange using Linux
I would like to use my Linux console to read Bitcoin price from specific exchange using one-liner command. I were able to achieve that using `Curl` with the following command. curl -sSL https://api.binance.com/api/v1/ticker/price?symbol=BTCUSDT | head -n 1 | sed "s|^.*,|$|" | sed "s|\(\.[0-9]$\)|\10...
I would like to use my Linux console to read Bitcoin price from specific exchange using one-liner command.
I were able to achieve that using
Curl
with the following command.
curl -sSL https://api.binance.com/api/v1/ticker/price?symbol=BTCUSDT | head -n 1 | sed "s|^.*,|$|" | sed "s|\(\.[0-9]$\)|\10|"
But I noticed a delay while retrieving the price and it's shown the price on the console wrongly.
αԋɱҽԃ αмєяιcαη
(1267 rep)
Feb 11, 2019, 09:00 PM
• Last activity: Feb 11, 2019, 09:45 PM
1
votes
1
answers
330
views
electrum 2.6.4 Bitcoin wallet on Debian Wheezy
I'm running Debian 7 stable and because the old version available on Wheezy can't send out BTC, I'd like to upgrade to a newer version which is available in jessie-backports. Is it possible to use that version? If so, how to modify sources.list?
I'm running Debian 7 stable and because the old version available on Wheezy can't send out BTC, I'd like to upgrade to a newer version which is available in jessie-backports. Is it possible to use that version? If so, how to modify sources.list?
Jord123
(23 rep)
Sep 1, 2016, 08:00 PM
• Last activity: Sep 4, 2017, 04:51 PM
Showing page 1 of 12 total questions