16 posts / 0 new / Last post
  August 23, 2011 - 9:21am (Reply to #11)
liudgervr's picture
Offline
Joined: Aug 2011
Posts: 4
  james wrote:

Hmmm - by chance did you have the 4.3.4 version of Remote HD installed?

 

Nope I haven't got remote HD installed.

  August 23, 2011 - 10:07pm (Reply to #12)
klondike's picture
Offline
Joined: Aug 2011
Posts: 2
  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.

I didn't really investigate further to see why `rm` was hanging on certain files, but it may be something to look into.

  August 24, 2011 - 12:28am (Reply to #13)
liudgervr's picture
Offline
Joined: Aug 2011
Posts: 4

Thanks this worked!

 

  klondike wrote:

 

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:

 

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.

I didn't really investigate further to see why `rm` was hanging on certain files, but it may be something to look into.

  October 7, 2011 - 10:08pm (Reply to #14)
kkluth's picture
Offline
Joined: Apr 2011
Posts: 1
  klondike wrote:

 

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.

I didn't really investigate further to see why `rm` was hanging on certain files, but it may be something to look into.

The easiest and fastest way to remove the directory is using FileZilla and just SFTP into the device then delete XBMC.frappliance in /Applications. I finally did that after doing `rm -rfv /Applications/XBMC.frappliance` about 20 times and feeling like I wasn't getting anywhere.

  October 27, 2011 - 3:16pm
mwarnas's picture
Offline
Joined: Aug 2011
Posts: 1

And for those who, like me, have no idea HOW to sftp into your Apple TV 2 I will refer you to an explanation on

http://support.firecore.com/entries/259317-connecting-via-ssh-and-sftp#overview

But please note: username/password on the Apple TV 2 is NOT 'frontrow/frontrow' but 'root/alpine' (1). Also, you'll have a hell of a time locating that folder (3), so using Filezilla (2) is nice because it saves a LOT of typing. Also, don't be alarmed, there are hundreds of files that will be deleted (in the xbmc directory referenced in the post above). You will need to restart the ATV2.

(1) Found that here: http://forum.xbmc.org/showthread.php?t=99904

(2) Free ftp software, available on all platforms. Settings should be as below:

[[wysiwyg_imageupload:99:]]

 

 

 

 

 

 

 

 

 

 

 

 

(3) When you connect you start in /Private/Var/Root so you should go BACK to / and then to /Applications

It is also worth noting you don't need to have your ATV2 connected via USB, you can do it over the network, even over wifi. Get the IP from the settings menu on your ATV.

Gentlemen, I yield to no-one in my admiration for your technical expertise but seriously, spare a thought for those who DON'T routinely sftp into servers all day...