Solving alien’s “File exists unable to mkdir” problem

So I think I’m not the only one who faced this error. It is not explained in any way,  so if you read this “File exists
unable to mkdir” you don’t really know where you should look. And now you do, thanks to me =))

This error occurs when you are trying installing some software for the second time (previous install might have failed or you may have re-installed your OS without formatting /home partition)

So when you are trying installing let’s say, Viber on your OpenSuse with Alien (yes, there seems to to be no official .rpm package, but who cares?) you may get this:

r01@R01-PC:~/Downloads$ sudo alien -rci viber.deb 
root's password:
mkdir: cannot create directory ‘viber-’: File exists
unable to mkdir viber- at /usr/lib/perl5/vendor_perl/5.18.1/Alien/ line 257.

So pay attention that my path is:

r01@R01-PC:~/Downloads$ pwd

Your path might be different, so keep this in mind. My viber.deb package is in my Downloads directory and pwd is also there.

Basically Alien creates folder named as “package_name-version” in my case that was /home/r01/Downloads/viber- We just need to remove that folder by

rm -rf /home/r01/Downloads/viber-

That’s it. It will install without that annoying error.