Solved 10.1-RELEASE - missing libjpeg.so.8

So I am trying to install net/minidlna, which I have done before. However I think I used ports before on a previous machine, but this time I tried to use pkg. Anyway, when I try to run the program it burps back saying libjpeg.so.8 is missing.

I deleted the pkg, and try ports, and that fails but I don't see any useable error messages, likely due to they scrolled up my non-gui screen.

I did a ports update using section 5.5 of the handbook, and tried again. Using pkg I get the same result, libjpeg.so.8 is still missing. And trying to use ports, it aborts in error.

So, I guess my questions are:
  1. How do I 'install' libjpeg.so.8 back into the OS? Is there a port I can run?
  2. What could be causing using the ports to fail? (Is there a way to scroll back on a VGA output?)
  3. How do I 'reset' the ports install so that I can install using ports successfully, which I am guessing will also fix the missing libjpeg.so.8 issue? Right?
This is good fun, really starting to get into growing my knowledge of FreeBSD. Thanks again everyone for your support. I've become a real champion at work, in a place where Windows and Linux rules. A couple people are now considering giving it a go to check it out. :)
 
Hit scroll lock (pause on some keyboards) and the up arrow to scroll back. Check /usr/ports/UPDATING to make sure there's nothing about that library. (Sorry, writing this from a CentOS machine and too lazy to check myself.)

Also, be sure to run portsnap fetch update before building from ports. This updates your current ports tree. It may be that an older Makefile from some port or another is looking for that shared object and can't find it because it's been updated.
 
Also, be sure to run portsnap fetch update before building from ports.

Yep, that is what I did after I encountered the snags. No joy.

Thanks for scroll tip. So the reason ports install is failing is because it is trying to pull stuff from devel/p5-Locale-gettext..... and the stuff is not found.

pkg installs fine, but program will not run due to missing libjpeg.so.8 and port does not install. Hmmmmmm.
 
Last edited by a moderator:
Not clear what you did, but probably an outdated binary package. pkg has commands for updating, but I don't use binary packages.

For ports, make certain you are following /usr/ports/UPDATING. It is not optional. See Upgrading FreeBSD Ports.
 
I wonder if you may have run into the gettext issue mentioned in UPDATING. (Although your error isn't specifically mentioning the gettext port). Anyway, do a search through UPDATING for gettext--if you haven't done that change (not sure how old it is by now), it will definitely cause problems, even if unrelated to the issue you're facing.
 
Last edited by a moderator:
graphics/jpeg provides the /usr/local/lib/libjpeg.so.8 shared library. You should update all packages on the system at once be it via ports or packages as attempting to mix and match as that may result in dependency mismatch. If you've upgraded everything at once already, pkg check -d would help resolve an issue with a missing JPEG package, pkg check -B would help track down shared library issues, and pkg check -s would help track down corrupt files.
 
This morning when I do pkg check -B it tells me that shared library /user/local/bin/xgettext - gettext-tools-0.19.4 not found, as well as a bunch of shared libraries for /user/local/sbin/minidlnad not found including liqsqllite3.so.0 The other pkg check commands are 100% okay.

Now yesterday I searched the Internet and found an article so I thought I would try this, since these are home/development server so its not the end of the world if I go down a sink hole:
# cd /usr/ports/graphics/jpeg
# make deinstall clean
# make install clean

Ports told me to delete the port first and reinstall, so I did. The I tried again to install net/minidlna using ports and that fails with same as before being unable to access due to not found: /usr/ports/devel/p5-Locale-gettext/. So then I deleted the port again and tried using pkg. Again pkg completed successfully, but now I no longer get the missing libjpeg.so.8 message, but get message not found: liqsqllite3.so.0. I just don't know if I have fixed one issue, and not the rest, or if in fixing one, I created the others. :p

This experience makes me want to ask the issue, which should I be using: ports(7) or pkg(8). Various posts seem to suggest pkg is the new better way but I am not so sure. Its sure seems faster and smoother for sure and great if you don't want to customize. I don't want to derail this discussion about the theory of which is better pkg or ports, so feel free to refer me to other threads in here, or other articles on the www, or private message me if you want. For now I have two choices (1) starting from scratch (remember I have net/minidlna installed on 10.1-RELEASE on two servers now so I know it works) by blowing away the current OS install and try again, or (2) I would rather learn from this problem by going through it, not around it, and fix it manually.

Thoughts?
 
Last edited by a moderator:
So I started into this:
# portmaster -L --index-only| egrep '(ew|ort) version|total install'

And the output caused me to do this:
portmaster cups-client libcheck libid3tag libtool nasm pkgconf sqlite3 unzip xorg-macros xtrans zip alsa expat freetype2 gmp inputproto java-zoneinfo libogg libpthread-stubs libxml2 m4 perl5 xextproto xproto fontconfig libICE libSM libX11 libXau libXdmcp libXext libXfixes libXi libXt libXtst libgcrypt libgpg-error libvorbis libxcb python python python binutils bootstrap-openjdk flac gmake libXpm libexif libxslt mpfr openjdk tmux xcb-proto

All was going well for quite a while, with me being like Homer Simpson pressing the 'y' key when prompted. Now I am stuck in a failure loop:

Code:
gmake[3]: Leaving directory '/usr/ports/devel/binutils/work/binutils-2.25'
Makefile:831: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/devel/binutils/work/binutils-2.25'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/binutils
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/binutils

===>>> make build failed for devel/binutils
===>>> Aborting update

===>>> Update for binutils-2.23.2 failed
===>>> Aborting update

===>>> There are messages from installed ports to display,
  but first take a moment to review the error messages
  above.  Then press Enter when ready to proceed.


===>>> You can restart from the point of failure with this command line:
portmaster <flags> devel/binutils java/bootstrap-openjdk audio/flac x11/libXpm graphics/libexif java/openjdk7 sysutils/tmux devel/libevent2 devel/autoconf devel/autoconf-wrapper misc/help2man devel/gmake-lite devel/p5-Locale-gettext devel/automake devel/automake-wrapper

I restart by copy/pasting the text above, but end up in the same spot.binutils-2.25 will not upgrade. Suggestions anyone?
 
The output above suggests to me you've upgraded FreeBSD to 10.1-RELEASE from a previous version and haven't been updating your installed ports, instead, picking and choosing what you want to install/update(binutils-2.23.2 is 2 years old at this point). You don't need to reinstall the operating system. The FreeBSD base system is seperate from the ports system and at worst you can reinstall all your installed ports using the instructions at the end of the portmaster(8) man page. In fact that is what I personally would recommend at this point after making a backup. Packages work great if you have no need to alter the defaults, otherwise use ports, but don't mix both unless you really know what your doing. It will save you time and many future headaches. If you use ports, following any relevant instructions in /usr/ports/UPDATING is mandatory before each update, and do update all installed ports/packages at regular intervals set by yourself.
 
The output above suggests to me you've upgraded FreeBSD to 10.1-RELEASE from a previous version and haven't been updating your installed ports, instead, picking and choosing what you want to install/update(binutils-2.23.2 is 2 years old at this point).

Nope, not quite true. All my machines are fresh installs of 10.1-RELEASE using ISO image download. Up till now, I have been able to install a program or two, using either ports or pkg with no issues so far. I'm a newby, but am learning lots, when I have time. (All my machines are development / home use machines so I don't worry about backups yet.)

But if I reinstall all my installed ports, how do I know I won't end up in the same situation; binutils upgrade failing? And isn't portmaster supposed to work through the various dependencies, etc, and sort that out?

But yes, after I get past this I will be working on my discipline of update all installed ports/packages at regular intervals.
 
But if I reinstall all my installed ports, how do I know I won't end up in the same situation; binutils upgrade failing?

It might. One aspect of /usr/ports/UPDATING is that it sometimes includes system things, things that all users must do to update the system. People who don't check that file every time before updating or installing new ports or who search through it for only the notes about a specific port find this out the hard way. Your p5-gettext error could be one of those.

Most of the time, deleting and reinstalling all ports gets everything up to the latest version.

And isn't portmaster supposed to work through the various dependencies, etc, and sort that out?

Sure, but it can't handle problems that are not dependency problems.
 
Portmaster also has problems detecting changed dependencies in case the version numbers of the affected ports haven't changed. Ideally all of the affected ports should always have their version numbers bumped but hasn't always been the case. In such cases ports-mgmt/poudriere usually detects the change correctly and rebuilds all affected ports which is why it's recommended now over anything else if you're building your own ports, it does take a bit more time and effort to set up but it fixes a lot of the problems like these in this thread.
 
Well I did portmaster -a -f -D and I think I am now worse off. :eek:

It fails on this:
Code:
===>  Cleaning for libevent-1.4.14b_2
===>  libevent-1.4.14b_2 is marked as broken: Not staged..
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/libevent

===>>> make build failed for devel/libevent
===>>> Aborting update

===>>> Update for devel/libevent failed
===>>> Aborting update

===>>> There are messages from installed ports to display,
  but first take a moment to review the error messages
  above.  Then press Enter when ready to proceed.


....and tells me to restart, and fix up all of these which is more than before:
Code:
> You can restart from the point of failure with this command line:
  portmaster devel/libevent audio/libogg devel/libpthread-stubs security/libtasn1 multimedia/libvpx devel/yasm shells/bash devel/bison devel/m4 multimedia/libx264 textproc/libxml2 net/mDNSResponder graphics/opencv-core math/eigen3 devel/orc x11/recordproto x11/renderproto security/trousers devel/autoconf devel/autoconf-wrapper misc/help2man devel/gmake-lite devel/p5-Locale-gettext devel/automake devel/automake-wrapper devel/libtool x11/xextproto multimedia/xvid misc/compat8x devel/gettext math/gmp security/gnutls dns/libidn security/nettle security/p11-kit x11/libICE x11/libSM x11/libX11 x11/libXau x11/libXdmcp x11/libxcb devel/libcheck lang/python2 textproc/libxslt security/libgcrypt security/libgpg-error x11/xcb-proto x11/libXext x11/libXfixes x11/libXi x11/libXrender x11-toolkits/libXt x11/libXtst multimedia/libtheora audio/libvorbis multimedia/schroedinger devel/binutils math/mpfr java/bootstrap-openjdk print/cups-client multimedia/ffmpeg textproc/texi2html audio/flac x11/libXpm graphics/libexif java/openjdk7 lang/python sysutils/tmux devel/libevent2

But of course I am caught in endless failure loop again. I lied earlier, I am working on a server that runs the oxygen generator for the planet. :D

I'll take some time to read through the
The procedure at the end of portmaster(8) is outdated. The newer version (in patch form) is here: https://bz-attachments.freebsd.org/attachment.cgi?id=148481

Sure, but it can't handle problems that are not dependency problems.

What problem is this then? This started by me trying to install minidlna, saying something it needed wasn't there. Isn't that a dependency? I realize root cause is my not keeping ports up to date, but the tools suggested so far were all about that weren't they? Fixing broken, missing or outdated dependencies?

The part I am not understanding is why do these commands fail saying stuff is missing, when that is the job of these tools to find these issues and fix them. Its kinda like a tire pump saying it can't pump up a tire because its too flat.
 
The part I am not understanding is why do these commands fail saying stuff is missing, when that is the job of these tools to find these issues and fix them. Its kinda like a tire pump saying it can't pump up a tire because its too flat.
Yes, but you can't pump up the flat tire with the tire pump if the reason the tire is flat is because there is a hole in it which in turn would first require additional manual patching before you could pump it back up. ;)

portmaster and similar tools do indeed figure out most dependencies for you, but there are certain times when none of these tools can do it automatically and do require manual/additional steps to be taken from the user first. A couple reasons are ports being renamed, moved or deleted. This is one of the reasons /usr/ports/UPDATING exists; to allow you to take care of these steps before updating so you don't have problems similar to this thread.
 
At a certain point I had to delete not only all the packages, but also all the ports tree. Then I fetched the latest one and built all the ports afresh using portmaster(8). I was on FreeBSD-9.1 then. Since then I regularly updated ports, then later had to rebuild them all upon upgrade to 10-RELEASE, and regularly update ports ever since. And so far everything is OK. Well, there used to be updating problems, but those were more or less simple to solve: delete a problematic port, install a new one instead.

Tried net/minidlna, it builds well and no complains. And so does graphics/jpeg.
 
But if I reinstall all my installed ports, how do I know I won't end up in the same situation; binutils upgrade failing?
If you start afresh there shouldn't be any "upgrade" problems because everything is fresh install and no upgrade needed at all. Fetch the latest ports tree, clean the pkg database, build everything afresh with portmaster(8). And that's to build pkg(7) first of all, using make install clean procedure.Then the same for portmaster(8). Then the rest you install using portmaster(8). There should be no such problem then.
 
Back
Top