Author Topic: apt-get upgrade problem  (Read 12973 times)

grepico

  • Veteran
  • ***
  • Posts: 109
    • View Profile
apt-get upgrade problem
« on: September 25, 2014, 02:47:09 am »
When I run apt-get upgrade, I get the following output:
Code: [Select]
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 141528 files and directories currently installed.)
Preparing to replace bash 4.1-2ubuntu3 (using .../bash_4.1-2ubuntu3.1_i386.deb) ...
Unpacking replacement bash ...
dpkg: error processing /var/cache/apt/archives/bash_4.1-2ubuntu3.1_i386.deb (--unpack):
 trying to overwrite '/bin/sh', which is also in package dash 0:0.5.5.1-3ubuntu2
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode.
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/bash_4.1-2ubuntu3.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

A search on the internet hasn't yielded anything that has worked.  Any suggestions?

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: apt-get upgrade problem
« Reply #1 on: September 25, 2014, 06:47:16 am »
That package is not a LinuxMCE package. I would check with a Ubuntu forum.

G.I.R.

  • Veteran
  • ***
  • Posts: 58
    • View Profile
Re: apt-get upgrade problem
« Reply #2 on: September 29, 2014, 10:42:38 am »
Hello,

i don`t know if You still have this problem, but I have run into the same today, wanting to update bash.
I found this and it seems that everything is okay now:
https://lists.debian.org/debian-user/2014/09/msg02032.html

maverick0815

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 858
    • View Profile
Re: apt-get upgrade problem
« Reply #3 on: October 18, 2014, 11:25:29 am »
I'm sorry, but as I rwad, there are a lot of scripts in lmce build on bash and your post seems to suggest to change bash to dash...I'm not too comfortable with that, so do you have an idea how I could upgrade bash? I have the exact same problem  as the starter of this thread.

G.I.R.

  • Veteran
  • ***
  • Posts: 58
    • View Profile
Re: apt-get upgrade problem
« Reply #4 on: October 18, 2014, 05:26:22 pm »
hmmm,
i am afraid You are right. But i am really not that deep into ubuntu to even guess.
hopefully i didn`t post a "format c:"  :o if, then i am really sorry!
the update worked for me and i am not experiencing any troubles (until now).
so:
Code: [Select]
dpkg-divert --package dash --divert /bin/sh.distrib --add /bin/shthis means that everything that wants to install /bin/sh is redirected to /bin/sh.distrib? The only exception is the package dash?
At my computer /bin/sh is still linked to bash and /bin/sh.distrib is also a link to bash.
I checked if i have substituted dash with bash back then, but as my bash history tells me, it doesn`t seem so.
i just tried to remove the diversion and i got the error again when trying to update.
with the diversion everything is or seems to be fine....
what do You think? Or anybody else, who can bring some enlightment?

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: apt-get upgrade problem
« Reply #5 on: October 21, 2014, 05:26:06 am »
Hi folks!

It's probably best if we know what you're dealing with.  You might want to take a peek at my post here for which version of bash you should be on for your given version of Ubuntu/LinuxMCE. 

http://forum.linuxmce.org/index.php?topic=13775.msg100243#msg100243

Specifically, run this:

Code: [Select]
sudo apt-get update && cat /etc/lsb-release && sudo apt-cache policy bash
Followed by this (which should show the diversion of sh to dash):

Code: [Select]
# dpkg-divert --list /bin/sh*
diversion of /bin/sh to /bin/sh.distrib by dash
# ls -la /bin/sh
lrwxrwxrwx 1 root root 4 Mar 29  2012 /bin/sh -> dash


Probably the easiest way to patch bash and fix any potential diversion issues is to reinstall both shells.

Code: [Select]
#sudo apt-get install --reinstall bash dash

Let us know how that goes for you.

Cheers!

/Mike
« Last Edit: October 21, 2014, 05:28:06 am by mkbrown69 »

sedgington

  • Veteran
  • ***
  • Posts: 82
    • View Profile
Re: apt-get upgrade problem
« Reply #6 on: July 01, 2015, 12:17:35 am »
For me, running 10.04 on QNAP's virtualization station  directly from the linuxmce-final .iso file as a Ubuntu 10.04 LTS variant, GIR's link worked. I ran the command:

sudo dpkg-divert --package dash --divert /bin/sh.distrib --add /bin/sh;

and then ran sudo apt-get upgrade and everything took instantly: 192 files upgraded. The problem with the other posts is that in this version of Ubuntu there is a missing divert that the above command links. The other commands return nothing because this divert does not exist. Hope this saves someone several hours of looking.

BTW, LMCE 10.04 on QNAP works great so far and is a breeze to install except for this one hiccup.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: apt-get upgrade problem
« Reply #7 on: July 01, 2015, 04:38:06 am »
You might want to go to 12.04 or 14.04 going forward, as 10.04 is no longer supported.

-Thom

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: apt-get upgrade problem
« Reply #8 on: July 02, 2015, 01:06:29 am »
BTW, LMCE 10.04 on QNAP works great so far and is a breeze to install except for this one hiccup.

Thank you for that piece of information!  Some of us have been discussing this option for while now.

J.

sedgington

  • Veteran
  • ***
  • Posts: 82
    • View Profile
Re: apt-get upgrade problem
« Reply #9 on: July 03, 2015, 02:50:44 pm »
Thanks for your responses. Because this was so easy to install with 10.04 (and fast) I'm willing to try to install either of the "bleeding edge" versions. If you need/want asterisk and have experience with it, which version would you recommend? 12.04 or 14.04 if you want your phones to work and you still have not converted your Cisco 7970 phones to SIP from SCCP? Conversely, which version is getting the most development effort at this point?

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: apt-get upgrade problem
« Reply #10 on: July 28, 2015, 04:06:40 am »
1204 is getting the most development, trying to bring things up to feature parity and bug fix where we have time.  We really don't have enough volunteers working on code atm.

J.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: apt-get upgrade problem
« Reply #11 on: August 27, 2015, 09:54:18 pm »
or...

echo "Package: bash
Pin: version 4.1-2ubuntu3
Pin-Priority:1001" > /etc/apt/preferences.d/bash

and update/upgrade.
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: apt-get upgrade problem
« Reply #12 on: August 27, 2015, 11:31:11 pm »
ick, that'll prevent further upgrades.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: apt-get upgrade problem
« Reply #13 on: September 30, 2015, 04:31:41 am »
ick, that'll prevent further upgrades.

10.04 isn't receiving future upgrades, and the current recommended version will not upgrade... so if you wanna roll with the now unsupported 1004, that is the only way I have found to make it go.
I never quit... I just ping out.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: apt-get upgrade problem
« Reply #14 on: September 30, 2015, 04:44:21 am »
Lucid is completely unsupported by ubuntu and by the LinuxMCE team at this point.   The wiki will be updated to reflect that shortly.  Anyone that is using 1004 and requires updated packages or configuration should upgrade to 1204/precise.

Let's start new topics for current issues rather than resurrecting year old threads.  :)

J.