question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install script doesn't work on non-debian distributions

See original GitHub issue

Kind of a noob question.

I have just installed python 3.9.6 on CentOS 7, and am getting “Python 3.9.6” as a response to “python --version.” I tried to run chiadog install.sh but got an error:

Chiadog requires Python 3.7+. Please update before proceeding with the installation

Do I need to drop the python version to 3.7?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Jacek-ghubcommented, Aug 14, 2021

Thank you, I noticed that, and already fixed it, and got it working.

After installing p3.6.9, there was no python3 symlink created - only “python” still pointing to 2.7. So, I changed that symlink to point to the p3.9.6 binary, but I didn’t initially create p3. Checking the install script, I added p3 symlink, and it started working. As I said, I am new to python, so I don’t really know what is the proper installation, whether what I got is normal, or rather something went wrong.

As mentioned, I am on CentOS 7, as such the install.sh barfs on apt-get. RedHat derived OSes don’t use that.

Also, that “sudo apt-get update” potentially should not be there. If that is the same as yum update on RedHat, it will force the user to update everything on the system, what may not be what the user is ready to do. I think that echoing those two lines and exiting the script would be a better idea. Another reason is that on RedHat you need to install libpython3-devel, as …-dev is just for Debian based OSes.

And of course, dpkg also does not exist on RedHat based system.

I think that the install script should stick with its own code, not really be doing system level changes. I know it is tempting to do that, but you are just forcing your guesses against what the user decided to have. It is tempting, as it may be helping some people, but may cause issues for those that are for whatever reason not ready to do that. Just letting people know (echo) what needs to be done should be good enough (that note about wrong version helped me to fix the problem).

Also just noticed that “build-essential” looks like is not there under RedHat. Same for dpkg.

So, basically all those maintenance related lines are wrong if the OS is not Debian based.

0reactions
gurkburk76commented, Sep 27, 2021

I have a similar issue on truenas running a jail. There is this nifty chia plugin there that runs in a jail and where i run a harvester. I thought i kinda made it work by running the stuff in install.sh that is able to run but i get errors when starting the dog so i guess not 😃 I belive truenas runs on freebsd.

Error: [root@san-chia-harvester ~/chiadog]# ./start.sh Traceback (most recent call last): File “main.py”, line 13, in <module> from src.chia_log.log_consumer import create_log_consumer_from_config File “/root/chiadog/src/chia_log/log_consumer.py”, line 23, in <module> import paramiko File “/root/chiadog/venv/lib/python3.8/site-packages/paramiko/init.py”, line 22, in <module> from paramiko.transport import SecurityOptions, Transport File “/root/chiadog/venv/lib/python3.8/site-packages/paramiko/transport.py”, line 129, in <module> class Transport(threading.Thread, ClosingContextManager): File “/root/chiadog/venv/lib/python3.8/site-packages/paramiko/transport.py”, line 190, in Transport if KexCurve25519.is_available(): File “/root/chiadog/venv/lib/python3.8/site-packages/paramiko/kex_curve25519.py”, line 30, in is_available X25519PrivateKey.generate() File “/root/chiadog/venv/lib/python3.8/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py”, line 39, in generate from cryptography.hazmat.backends.openssl.backend import backend File “/root/chiadog/venv/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/init.py”, line 6, in <module> from cryptography.hazmat.backends.openssl.backend import backend File “/root/chiadog/venv/lib/python3.8/site-packages/cryptography/hazmat/backends/openssl/backend.py”, line 113, in <module> from cryptography.hazmat.bindings.openssl import binding File “/root/chiadog/venv/lib/python3.8/site-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 14, in <module> from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: /root/chiadog/venv/lib/python3.8/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: Undefined symbol “SSLv3_client_method”

Python 3.8.11

What i did to “manually” install it was:

Create virtual environment

python3 -m venv venv

Activate virtual environment

. ./venv/bin/activate

Update pip3 to latest version

python3 -m pip install --upgrade pip

Install dependencies

pip3 install wheel && pip3 install -r requirements.txt

Deactivate virtual environment

deactivate

and ./start.sh Error above.

Also, the reason i wanted to run the dog is that i’ve noticed that the harverster for some reason stops working, i know i can get notifications but could it alse be added as a feature that i actually restarts the harvester? Would save some time and effort.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable install script to auto-detect distribution and release ...
Issue. Instead of having to specify the --distribution and --release options to the install script, the script should be able to reliably ...
Read more >
why don't any linux distrubutions have common platform to ...
Any software that is built say in windows, has a executable/setup file. If you want to download any application. You just go to...
Read more >
DontBreakDebian - Debian Wiki
First of all, apt-get upgrade default behavior is to upgrade any installed package to the highest available version.
Read more >
How to fix a "Command not found" error in Linux - Red Hat
Learn five ways to deal with a "Command not found" error, Linux users. ... the script or file you're trying to execute doesn't...
Read more >
How can I get distribution name and version number in a ...
lsb-* isn't installed/doesn't exist on base CentOS or Debian systems ... So inside your Bash script you can just include the file, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found