# Problems after pkg_upgrade



## atarahas (May 7, 2010)

After upgrading several packages, some libraries were upgraded by pkg_upgrade. However, it seems as though many programs were linked to old versions of the library, including it seems KDE. Ive tried symlinking the old filename to the new version of the library, but some things do not work still:

 kicker

```
/libexec/ld-elf.so.1: /usr/local/lib/libjpeg.so.10: version LIBJPEG_7.0 required by /usr/local/lib/libqt-mt.so.3 not found
```
 
In this case libjpeg.so.10 was deleted by pkg_upgrade and replaced with libjpeg.so.11. I symlinked the so.10 filename to so.11 now i get this message.

What can be done to fix this problem?


----------



## zeiz (May 7, 2010)

If I had portupgrade package installed I would try `# pkgdb -F`.


----------



## DutchDaemon (May 7, 2010)

Don't upgrade 'several' packages, keep all of them upgraded or you'll end up in dependency hell.


----------



## atarahas (May 7, 2010)

The fact i cannot do a piecemeal upgrade indicates the design of the package system is totally broken. It is a little disturbing that something which would just be good design practice is not there, and it certainly makes for a miserable experience. if a new version of the library is compatable with the old version, why not delete the old version and replace it with a symlink. If the new version is not compatable, leave the old one there. its simple, really. Mark each package as to whether it is backwards compatable or not,


----------



## atarahas (May 7, 2010)

The problem remains unresolved, still. The idea of having to upgrade the whole system when i just need one or two packages upgraded is unacceptable and overkill.


----------



## atarahas (May 7, 2010)

Would anyone know how i could install libjpeg.so.10 again so that it is avialable. In what package is it located?


----------



## zeiz (May 7, 2010)

sounds like "jpeg" package.
`# cd /usr/ports/graphics/jpeg && make deinstall && make reinstall`


----------



## phoenix (May 7, 2010)

If you use portmaster and/or portupgrade, they can be configured to save a copy of the old library under /usr/local/lib/compat/ so that installed apps that want the old lib will continue to work.  It's all right there in the man pages.  

If you are going to use pkg_upgrade, then you have to make sure you upgrade *everything* all at once, in order to keep everything in sync.  Don't do piecemeal upgrades using pkg_upgrade, and don't mix ports and packages unless absolutely necessary (like the initial install of KDE, or installing OpenOffice.org, etc).


----------



## atarahas (May 8, 2010)

ive figured out that portupgrade seems to be the best to use and so to keep around old versons of the library seems to be the safest option. So i will use portupgrade from now on. I was originally having trouble getting it to work but i have figured out that the environment variable PACKAGESITE needs to be set to  ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/ to make it install the latest packages and to keep the ports up to date with cvup. It might help others to add mention of this to portupgrades man page such as the directory format  so the user can figure out the right address to use for the latest packages, or the ones which were a part of the original release, etc. the last slash in the above address was critical, this should be mentioned.


----------



## atarahas (May 8, 2010)

I suppose what i need to do now is do a pkg_upgrade of everything to get out of  library hell and in the future use portupgrade. so hopefully that will fix the problems


----------



## jb_fvwm2 (May 8, 2010)

If you ABSOLUTELY need the programs before the
upgrades, sometimes just copying the new .so. to
the old one (renaming the old one) works.
....
There are a few programs which sometimes require
downtime to upgrade, at least here...
(png, jpeg, xorg, gnome, gettext, libtool... ).  as there
are many  programs depending upon them.  With 
experience, though, it can be done smoothly if 
planned at the local machine(s) better.  
...
Other alternatives to explain (a build machine) but
I've not implemented them yet so am not the expert.
(Maybe see the freebsd-questions list of this month).


----------



## harishankar (May 8, 2010)

I used pkg_upgrade with -a option. After that a pkgdb -F fixed stale dependencies. 

It's good to keep synced with all updated packages. Even under Linux, I never updated a single package. Always update the whole system. If you do it at least once a week, it will not be a problem as there won't be so many upgrades at once.

But I agree overall that FreeBSD users seem to care more about ports than packages, which is a pity. A lot of us here who are drawn to BSDs don't like to compile everything. I still have nightmares about building KDE on Gentoo and I don't want to repeat that performance. I am not saying it's not reliable, but it just takes FAR too long to keep a simple desktop system updated. I tend to use a LOT of desktop apps so ports will only magnify the issue even more.


----------

