This is another CentOS report to help fellow CentOS users. Here’s a workaround for the error “Conflicts with file from package”.
Why This Error Occurs
When you receive this error, you most likely tried to build a package using the RPM command. RPM commands allow you to compile programs not available on your systems. However, at times yum has previously installed a version of the program so it is always a good idea to first try installing a program using this command:
yum install package_name
yum install python-crypto
However, this depends on your CentOS repo whether this will work or not. If you are new to CentOS you may want to read our guide how to install the EPEL Repo which will give you a basic idea of what you have to do to expand your yum base (meaning: to include more packages from external sources).
If your current repo cant install a package and you already downloaded EPEL and Atomic repo, then I suggest you download the RPM from the source and compile it using rpm.
rpm -ivh package.rpm
Now when you do that and there is a previous installation you will get the error “Conflicts with file from package xyz”
Then you can use the following parameter:
rpm -ivh --replacefiles
–replacefiles will help you to replace the previous installation. Make sure you know what you’re doing as this could break something and/or result in “dependency hell” (meaning some programs will stop working because they depended on a previous version) depending on what kind of package you are trying to upgrade.