Missing support of Raspbian distribution in installation script
Opened this issue · 0 comments
kodekracker commented
I tried to install this plugin in raspberry pi, it returned me error.
Traceback (most recent call last):
File "collectd-cloudwatch-setup.py", line 965, in <module>
main()
File "collectd-cloudwatch-setup.py", line 958, in main
install_plugin()
File "collectd-cloudwatch-setup.py", line 870, in install_plugin
install_packages(SYSTEM_DEPENDENCIES)
File "collectd-cloudwatch-setup.py", line 262, in install_packages
command = DISTRIBUTION_TO_INSTALLER[detect_linux_distribution()] + " ".join(packages)
KeyError: 'Raspbian GNU'
As raspbian OS is build upon debian, so APT installer works in this OS.
It would be good, if it's support will be added in it.
Solution
Right now, i edited the setup.py
file at line no. 63, and added key for this missing OS.
DISTRIBUTION_TO_INSTALLER = {
"Raspbian GNU": APT_INSTALL_COMMAND,
"Ubuntu": APT_INSTALL_COMMAND,
"Red Hat Enterprise Linux Server": YUM_INSTALL_COMMAND,
"Amazon Linux AMI": YUM_INSTALL_COMMAND,
"Amazon Linux": YUM_INSTALL_COMMAND,
"CentOS Linux": YUM_INSTALL_COMMAND,
}
And, it worked.