Libjpeg "make install" does not work.

Hello. I recently downloaded, configured and executed make on libjpeg.

Until there all worked well. Then suddenly when executing what shall be the simplest part, it returned this error message:

I have no idea as to why this problem is happening, since cjpeg was successfully built.

This is the installation rules of the makefile :

# Installation rules:

install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom 
    $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
    $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
    $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
    $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
    $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
    $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
    $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
    $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
    $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
    $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)

install-lib: libjpeg.$(A) install-headers
    $(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)

install-headers: jconfig.h
    $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
    $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
    $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
    $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h

Anyone can see something wrong (and how to fix it)?. If there is nothing wrong there, guess I will try to manually do what the Makefile should have done and see if the program that need it will work.

Now, the error msg seems pretty clear:

/usr/bin/install: cannot create regular file  `/media/34GB/Arquivos-de-Programas-Linux/Jpeg-6b//bin/cjpeg': No such  file or directory

Does the target directory exist?

Well, no, but isn't this "install" job to do so? I mean, never before I did a "make install" that had issues to create directories.
When I read this message, I thought it was referring to the cjpeg file. Are you sure isn't about it?

Edited: Created a /bin dir and this error message was left behind. A new error message complaining about dir man/man1 showed up. Created that dir and this error message also disappeared. However, the install procedure is not creating and copying the includes and the .a lib file

I'm sorry, I can't tell. I don't know nor see your system nor install command / facility / process. If e.g. a cp command fails with a "create" error, it's less probable to be with the source file, but with the target directory / file.

The answer was on the Makefile.

solved the issue (after also manually creating the "dir" and the "include" directories)

1 Like