Solved

Trouble shooting error after installing & compiling C image library

Posted on 2004-08-16
13
217 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

13 Experts available now in Live!

Get 1:1 Help Now