6

I installed valgrind which replaced libc6 on my Ubuntu 12.04 system with a sligthly different version, which broke an application on my system. Can I somehow revert to the Ubuntu 5.1 version? If so, where can I find it?

Preparing to replace libc6-dev 2.13-20ubuntu5.1 (using .../libc6-dev_2.13-20ubuntu5.3_amd64.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.13-20ubuntu5.1 (using .../libc-dev-bin_2.13-20ubuntu5.3_amd64.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc-bin 2.13-20ubuntu5.1 (using .../libc-bin_2.13-20ubuntu5.3_amd64.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.13-20ubuntu5.3) ...
(Reading database ... 192982 files and directories currently installed.)
Preparing to replace libc6 2.13-20ubuntu5.1 (using .../libc6_2.13-20ubuntu5.3_amd64.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.13-20ubuntu5.3) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
/sbin/ldconfig.real: /usr/local/lib/liblzma.so.5 is not a symbolic link

Selecting previously deselected package libc6-dbg.
(Reading database ... 192982 files and directories currently installed.)
Unpacking libc6-dbg (from .../libc6-dbg_2.13-20ubuntu5.3_amd64.deb) ...
Selecting previously deselected package valgrind.
Unpacking valgrind (from .../valgrind_1%3a3.6.1-0ubuntu3_amd64.deb) ...
Processing triggers for man-db ...
Setting up libc-dev-bin (2.13-20ubuntu5.3) ...
Setting up libc6-dev (2.13-20ubuntu5.3) ...
Setting up libc6-dbg (2.13-20ubuntu5.3) ...
Setting up valgrind (1:3.6.1-0ubuntu3) ...
Indrek
  • 24,204
  • 14
  • 90
  • 93
hlitz
  • 163
  • 1
  • 1
  • 3

2 Answers2

4

The biggest problem is likely going to be to find the exact version that you had installed before as a .deb, especially if you did apt-get autoclean in between.

In general to install a particular version you would do

sudo apt-get install libc6=2.13-20ubuntu5.1

then you could mark the package as held using:

echo "libc6 hold"|sudo dpkg --set-selections

so that subsequent updates don't update it automatically. Problem for you would be to find a mirror that has the old version and use that or find the .deb for the old version and use dpkg -i ... to install it manually.

Try locate libc6_2.13-20ubuntu5.1_amd64.deb to see whether you have a cached copy.

However, what are the symptoms of the failing program? It's possible there are solutions to the problem other than reverting to an older version of libc6.

0xC0000022L
  • 6,819
  • 10
  • 50
  • 82
  • I found the exact packages on google and had to resolve some dependencies like installing sudo dpkg -i ./libc6_2.13-20ubuntu5.1_i386.deb – hlitz Feb 28 '13 at 06:24
  • I found the packages by googling the exact package name and had to resolve some dependencies: sudo dpkg -i ./libc-bin_2.13-20ubuntu5.1_amd64.deb then sudo dpkg -i ./libc6_2.13-20ubuntu5.1_i386.deb then sudo dpkg -i ./libc6_2.13-20ubuntu5.1_amd64.deb did the trick – hlitz Feb 28 '13 at 06:27
  • @hlitz: cool, glad you were able to dig up the packages. – 0xC0000022L Feb 28 '13 at 06:38
  • Couldn't you also grab from source and install from there? Curious. – LeanMan May 24 '20 at 02:57
  • @LeanMan sure, except that when you have a system set up to be controlled by a package manager, this _typically_ is the exact opposite of what you'll _want_ to do. However, YMMV. So sure. – 0xC0000022L May 24 '20 at 18:03
  • I've been experimenting with docker. I think there are a lot of challenges but its doable. – LeanMan May 24 '20 at 19:54
  • @LeanMan I never contested the claim that it's doable. It definitely is. But for starters Docker and this whole containerization business grew out of the fact that sometimes there are competing dependencies. So this is _exactly_ one of the points containers try to address. But you don't specify how you imagine to use Docker here. Yet, the mentioning of Docker makes me wonder. Because it still means the older libc would be running confined and only one application would use it. And that's quite a bit different. – 0xC0000022L May 25 '20 at 06:58
  • 1
    I never meant what I said as a direct contrary to what you said - I was mentioning a possible path. It was purposely non-specific and I didn't get into nitty gritty details as that is out of scope of this conversation and would require a post of its own. If you're curious it would require a lot of setup to control the packages like a conan repository that your docker would pull files from and then build the application from the ground up (with static libs). Doing something like this obviously requires a lot of work but it really helps with isolation, deterministic and repeatable results. – LeanMan May 25 '20 at 21:50
  • 1
    @LeanMan Agreed. It seems we look at the same thing, just from different points of view. Repeatable results are very tough to reach [when you rebuild](https://reproducible-builds.org), though. – 0xC0000022L May 26 '20 at 06:17
  • ooh thanks for the link - will look into it more diligently when I have more time. – LeanMan May 26 '20 at 18:46
-1

I've been struggling with libc-bin dependencies because I had installed a version higher than needed. Using deb packages isn't the way we should to upgrade particular packages. So, in my case, i did:

sudo aptitude install libc-bin

I was curious to see the output result as I needed libc6 to be downgraded too. Aptitude has a nice resolver solution from which I did! This was the solution I was looking for. I guess that any package that needs to be downgraded and has dependencies error, could be solved by this.