Don't confuse file names and RPM package names. An RPM package name is only the first part of a filename up to the version number. Commands such as "rpm --erase" only work with package names, not filenames, and optionally added version and release numbers. E.g.
rpm --erase hello
rpm --erase hello-1.0
rpm --erase hello-1.0-5
Not: rpm -e hello-1.0-5.i386.rpm
On to the other error:
Quote:
error: %pre(somerpm-1.1.0-665) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping somerpm-1.1.0-665
|
A pre-install scriptlet causes an installation failure. You don't want to install such a broken package. You could if you added option --noscripts, but you don't want to.
Search for a working package. Or find the corresponding src.rpm. In it, the broken scriptlet can likely be fixed.