New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find python dependency when python is installed. (Works but still gives error) #1779

Nodens- opened this Issue Jan 18, 2018 · 3 comments


4 participants

Nodens- commented Jan 18, 2018

Fedora 27 both python 3 and python 2.7 available but the script fails to detect the dependency and gives an error about yum.
I checked your implementation and you use yum to check if the package is installed. This doesn't work in this case though because while "dnf install python" (yum is just an alias to dnf for ages now on Fedora) installs python2, "dnf list installed python" returns nothing. "dnf list installed python2" does.

I do not know how you want to handle this as there are several options.

A) You can either detect later Fedora versions and check for python2 instead of python which just handles this case and I assume that other dnf distros that follow suit will probably be handling it the same way and fail. I see you handle Amazon like this.

B) Check the same way you do now but for both python and python2 for all rpm distros.

C) Ditch the yum check (which at some point will become obsolete/removed entirely hence it has an expiration date) and just do an "rpm -q python" followed by an "rpm -q python2" if the first check fails. Or "rpm -q {python,python2}" and parse the 2liner response.

C, in my opinion is the best option as it can be used for all redhat based distros regardless of version and if they have jumped to dnf yet or not or if they already have or will deprecate yum entirely. In this case ditching the frontend makes sense. It is only advised to use the package manager always for installing packages not for querying (in which case it's also faster to use rpm).

As a side note. It's a good idea to actually save the success detection of each of those dependencies and not check again for them every time. This will speed up the script execution by a LOT. Once the dependencies are found once, you don't need to check for them again. You can reset the detection state to check again if the script fails to start etc.. Also saving these variables, would allow a user to bypass the detection of a missing dependency (in case there's a bug/unhandled case in detection) by manually setting it as properly detected in the config file.


This comment has been minimized.

heihachi commented Feb 6, 2018

Can confirm having the same issue on fedora 27 as well with python installed.

[ERROR ] Starting arkserver: Checking dependencies: missing: python
Information! Automatically installing missing dependencies.
Last metadata expiration check: 2:29:31 ago on Tue 06 Feb 2018 10:03:45 PM CST.
Package python2-2.7.14-4.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete! Install dependencies

This comment has been minimized.


dgibbs64 commented Jun 16, 2018

I will review how CentOS and Fedora dependencies are checked

dgibbs64 added a commit that referenced this issue Jun 17, 2018


This comment has been minimized.


dgibbs64 commented Jun 17, 2018

I have updated function to specify fedora as an option using python2 specifically. Also changed the check from yum to rpm. Thank you for your feedback. Fix will be available in next release

@dgibbs64 dgibbs64 closed this Jun 17, 2018

@dgibbs64 dgibbs64 changed the title from Can not find python dependency when python is installed. (Works but still gives error) to Cannot find python dependency when python is installed. (Works but still gives error) Jul 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment