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

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

Trouble shooting error after installing & compiling C image library

Hello.

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
    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?

Thanks!
0
hankknight
Asked:
hankknight
  • 7
  • 3
  • 3
1 Solution
 
avizitCommented:
what the output of

ls -lai /extratools/vips/bin/vips

/abhijit/
0
 
avizitCommented:
Under normal circumstances you dont need to chmod 755 the installed files

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

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]#
0
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.

 
avizitCommented:
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


0
 
avizitCommented:
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.

/abhijit/
0
 
GnsCommented:
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
0
 
GnsCommented:
> Or a vips "command" found earlier in the PATH...)
Scratch that.... A PATH error is most likely.

-- Glenn
0
 
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:

/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

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

Thanks!


0
 
avizitCommented:
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


/abhijit/
0
 
avizitCommented:
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.

/abhjit/
0
 
GnsCommented:
> 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
0
 
hankknightAuthor Commented:
If I type in

    vips

it doesn't work

but if I type in

      ./vips

it does work!

Thanks
0
 
avizitCommented:
yes for reason read this

http://en.wikipedia.org/wiki/Path_(computing)


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

0

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