Apple TV root XBMC issue solved

I was having all kinds of difficulties with XBMC on my Apple TV2 and was trying to remove it and start all over.

It didn’t work out even when resorting to SSH through terminal.

Then I was able to find a solution over in the FireCore forums.

 

Basically required that I manually remove all the files.

Re: How to deinstall pakages?
liudgervr wrote:

please need some help. Got the same problem.

Apple-TV:~ root# apt-get remove org.xbmc.xbmc-atv2

E: Could not get lock /var/lib/dpkg/lock – open (35: Resource temporarily unavailable)

E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Apple-TV:~ root# cd var

-sh: cd: var: No such file or directory

Apple-TV:~ root# cd /var

Apple-TV:/var root# dpkg –get-selections > myapps.txt

Apple-TV:/var root# tail myapps.txt

shell-cmds install
sqlite3-lib install
syslogd install
system-cmds install
tar install

uikittools install
unzip install
wget install
zip install
zodttd install

Apple-TV:/var root# dpkg –configure -a
dpkg: status database area is locked by another process

 

What to do?

 

and for the same reason I am unable to install the maintenance update

 

I ran into this same problem tonight, and was able to solve it by removing the package directory manually. It turns out that `rm` was hanging on some files while removing the package directory, so when you try to uninstall again the lock is still in place. If you do a `ps -ef` you should see the offending processes at the bottom like this:

 

0 199 164 0 0:00.28 ttys001 0:00.94 apt-get remove org.xbmc.xbmc-atv2

0 200 199 0 0:00.06 ttys002 0:00.10 /usr/bin/dpkg –status-fd 18 –force-depends –force-remove-reinstreq –force-remove-ess

0 201 200 0 0:00.01 ttys002 0:00.02 /bin/sh /var/lib/dpkg/info/org.xbmc.xbmc-atv2.prerm remove

0 202 201 0 1:49.30 ttys002 2:02.82 rm -rf /Applications/XBMC.frappliance

 

 

To fix this, run `rm -rfv /Applications/XBMC.frappliance`. It will hang periodically on some files, so just pres [Ctrl + C] to terminate the command when you see it stop. Then just rerun the same command and it seems to take off again where the last one failed.

It took me about 10+ times of rerunning that command to remove all the files/directories. Once it’s all gone, you will need to kill the hung `rm` process so that apt-get can fail and remove it’s lock. Just do another `ps -ef` and locate the PID (the second number) for the rm -rf process (mine was 202 above). So I would run `kill 202` to stop the process. Finally just run `apt-get remove org.xbmc.xbmc-atv2` to make sure everything is removed OK, and restart your Apple TV.

Leave a Reply

Your email address will not be published. Required fields are marked *