Go Premium for a chance to win a PS4. Enter to Win

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Trouble shooting error after installing & compiling C image library


I am trying to install VIPS 7.8.14 and after what I thought was a
successfull instalation, I am getting an error.

I did the following without any errors:
    ./configure --prefix=/extratools/vips
    make install

I then created a file containing the following called vips.sh (with
permissions of 755) and placed in in the /etc/profile.d/ directory.

     export PATH=$PATH:/extratools/vips/bin
     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/extratools/vips/lib
     export MANPATH=$MANPATH:/extratools/vips/man
     export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/extratools/vips/lib/pkgconfig

 I logged out then logged back in as root.

 Again, no errors.

 But when I type in

     im_shrink bigpic.jpg thumb.jpg 4 4

 I get

     command not found

So, I did some trouble-shooing.

First, I typed in

     ls -l /extratools/vips/bin

which displayed a large number of commands, all linked to vips:
such as:
         im_shrink -> vips

ls vips displayed vips.

ldd -v /extratools/vips/bin/vips
        displayed all the needed & used libraries

So far, so good.

Lastly, I typed in /extratools/vips/bin/vips, and later, vips from the bin directory.

The following error was returned:
      bash: vips: command not found

I changed permissions to 755 and still get the same error.

Must I recompile it?  Anyway to pinpoint the error?

  • 7
  • 3
  • 3
1 Solution
what the output of

ls -lai /extratools/vips/bin/vips

Under normal circumstances you dont need to chmod 755 the installed files

"make install" should do all those for you
hankknightAuthor Commented:

Here is what I'm getting:

      [root@suncrest /root]# ls -lai /extratools/vips/bin/vips
      271859780 -rwxr-xr-x    1 root     root        54726 Aug 12 19:15 /extratools/vips/bin/vips
      [root@suncrest /root]#
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

is vips a binary file or a script file
I mean if its a script file there might be some command in the file which is not found

okay I installed vips myself to test ..seems to work for me  ( and vips is a binary file)

anyway do you get the "command not found"error when you type

"/extratools/vips/bin/vips"  on the command prompt ?

if so then its not a 644, or 755 etc issue
cos then you would have got a "Permission denied." error message.

Well, it cannot be an issue with permissions, not with what we've seen so far... More likely a typo with the path or somesuch.
> The following error was returned:
>      bash: vips: command not found
... indicate a problem with the PATH (a typo perhaps in the profile.d file? Or a vips "command" found earlier in the PATH...), so ... Could we see the output of "echo $PATH" too?
Or does the error persist with an absolute path (as abhijit is asking about)?

-- Glenn
> Or a vips "command" found earlier in the PATH...)
Scratch that.... A PATH error is most likely.

-- Glenn
hankknightAuthor Commented:
OK, thanks.

To try and rule out path conflicts, I removed vips.sh from the /etc/profile.d/ directory.

Now echo $PATH gives only me:


So, I go to the directory
and type in
and still get
    bash: vips: command not found

Can the path issue be ruled out since I removed the entries and tried to run it from the directory it is located in?


okay two things

1. type "which vips " and give the result. It should be /extratools/vips/bin  if not then something is wong

2. type ./vips in the directory /extratools/vips/bin

or type the full command  /extratools/vips/bin and press enter

only after this maybe we can rule out the path issue

okay got it damn i dint read properly

your path should contain /extratools/vips/bin

or else you have to give full path name when invoking the vips command

just type "/extratools/vips/bin/vips" whenever you want to use vips instead of just typing vips

or yuo can add "/extratools/vips/bin" to yuor path variable.

> Now echo $PATH gives only me:
> /usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
> So, I go to the directory
>    /extratools/vips/bin
> and type in
>    vips
> and still get
>     bash: vips: command not found
With that PATH (that contain neither "/extratools/vips/bin", nor ".") this is as expected. As Abhijit says, you either need specify a path on the commandline (either a relative path like "./vips", or an absolute one like "/extratools/vips/bin/vips") or include its directory in the PATH variable.
When you report this to us, it is very helpful if you do cut'n'paste from a terminal, so that we get to see the exact commandline used (and exact error).

-- Glenn
hankknightAuthor Commented:
If I type in


it doesn't work

but if I type in


it does work!

yes for reason read this


if the directory /extratools/vips/bin was included in your PATH environment variable you need not have had to type

./ vips

a simple vips woudl have done

in additoin to ./vips

typing it in full i.e typing "/extratools/vips/bin/vips" will also work from anywhere


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now