Issue
import subprocess
package_path = '/home/mypackage.rpm'
command = ['rpm', '-Ivh', package_path]
p = subprocess.Popen(command)
p.wait()
if p.returncode == 0:
print("OK")
else:
print("Something went wrong")
I am seeing this error while running the above script : Executing command "['/bin/rpm', '--ivh ', '/opt/starter/app_dist/filename.noarch.rpm']" rpm: --ivh : unknown option Something went wrong
Solution
The option is '-i', not '-I'. And not '--i'. Just '-i'.
Answered By - msuchy Answer Checked By - Cary Denson (WPSolving Admin)