当前位置: 代码迷 >> 综合 >> Solving alien’s “File exists unable to mkdir” problem
  详细解决方案

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

热度:39   发布时间:2024-01-22 03:41:15.0

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-3.1.2.3’: File exists
unable to mkdir viber-3.1.2.3: at /usr/lib/perl5/vendor_perl/5.18.1/Alien/Package.pm line 257.

So pay attention that my path is:

r01@R01-PC:~/Downloads$ pwd
/home/r01/Downloads

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-3.1.2.3. We just need to remove that folder by

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

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

  相关解决方案