Solved

Trouble shooting error after installing & compiling C image library

Posted on 2004-08-16
13
220 Views
Last Modified: 2010-08-05
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
Comment
Question by:hankknight
  • 7
  • 3
  • 3
13 Comments
 
LVL 11

Expert Comment

by:avizit
ID: 11816571
what the output of

ls -lai /extratools/vips/bin/vips

/abhijit/
0
 
LVL 11

Expert Comment

by:avizit
ID: 11816618
Under normal circumstances you dont need to chmod 755 the installed files

"make install" should do all those for you
0
 
LVL 16

Author Comment

by:hankknight
ID: 11816814
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
 
LVL 11

Expert Comment

by:avizit
ID: 11816821
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
 
LVL 11

Expert Comment

by:avizit
ID: 11817094
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
 
LVL 20

Expert Comment

by:Gns
ID: 11818287
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 20

Expert Comment

by:Gns
ID: 11818297
> Or a vips "command" found earlier in the PATH...)
Scratch that.... A PATH error is most likely.

-- Glenn
0
 
LVL 16

Author Comment

by:hankknight
ID: 11820355
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
 
LVL 11

Accepted Solution

by:
avizit earned 500 total points
ID: 11820457
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
 
LVL 11

Expert Comment

by:avizit
ID: 11820471
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
 
LVL 20

Expert Comment

by:Gns
ID: 11820663
> 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
 
LVL 16

Author Comment

by:hankknight
ID: 11822654
If I type in

    vips

it doesn't work

but if I type in

      ./vips

it does work!

Thanks
0
 
LVL 11

Expert Comment

by:avizit
ID: 11822811
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now