[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mdk-admin] rpm upgrade (fwd)



On Wed, 24 Oct 2001, guy keren wrote:

> On Tue, 23 Oct 2001, Tzafrir Cohen wrote:
>
> > > On Mon, 22 Oct 2001, Tzafrir Cohen wrote:
> > >
> > > > $ LD_LIBRARY_PATH=$HOME/tmp/lib:/lib rpm --rebuilddb
> > > > /usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2.3' not found (required by /home/tzafrir/tmp/lib/libc.so.6)
> > > > /usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2' not found (required by /home/tzafrir/tmp/lib/libc.so.6)
> > >
> > > well, '/lib/ld-linux.so.2' is a symlink to a library that comes as part of
> > > glibc. check if you have a link with the same name in your temporary
> > > directory. perhaps check 'LD_LIBRARY_PATH=$HOME/tmp/lib ldd /bin/rpm'
> >
> > Yes it is. It points to glibs2.1's ld.
>
> then you must make it NOT point there :) how exactly? this is a good
> question :) perhaps an strace could be helpfull:
>
> LD_LIBRARY_PATH=$HOME/tmp/lib strace -o /tmp/rpm.strace /bin/rpm
>
> and then look at /tmp/rpm.strace to see what files it opens.
>

Actually, having a second look at the error message:

$ LD_LIBRARY_PATH=$HOME/tmp/lib:/lib rpm --rebuilddb
/usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2.3' not found
  (required by /home/tzafrir/tmp/lib/libc.so.6)
/usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2' not found
  (required by /home/tzafrir/tmp/lib/libc.so.6)

So the library that has '/lib/ld-linux.so.2' hardwired is probably
'libc.so.6' in that directory. So probably what I should have done is to
edit this binary and change '/lib/ld-linux.so.2' to (say)
'/lib/ld-linuz.so.2' and make /lib/ld-linuz.so.2 a symlink to
/home/tzafrir/lib/ld-linux.so.2 .

Hopefully this is the only place where the loader is called from, but with
some testing it can be safe.

What I did eventually (because I have'nt thought about the above) was to
change the symlink /lib/ld-linux.so.2 temporarily to point to
/home/tzafrir/lib/ld-linux.so.2 . This left my main system without a
functioning libc. To run the 'ln' to change it back, I had to set
LD_LIBRARY_PATH again. And I had to use 'ln -sf' .

Anyway, this got me past yet one more roadblock in the upgrade path. I'm
now at the one called "libstdc++ incompatibility."

> > > note also that i completely removed /lib from the LD_LIBRARY_PATH, to make
> > > sure it does not attempt to pick there, thought then you'll have to copy
> > > other missing libraries to that library.
> >
> > I generally don't use LD_LIBRARY_PATH, only ld.so.cache. Note that I set
> > the value of LD_LIBRARY_PATH to be only the new directory.
> >
> > How can I tell theprogram not to load ld.so.cache ?
>
> 'ld.so.cache' isn't necessarily your problem. the problem is the library
> that reads this file. the above strace might show you how the dynamic
> loading is exactly done, and might give a hint.

Yes, I figured later that libc.so.6 was probably asking for
'/lib/ld-linux.so.2'

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il