LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 09-14-2003, 07:08 AM   #1
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Rep: Reputation: 15
perl module installation


Hi everybody,
I have a program called ImageMagick installed on a Linux server. I wanted to know if I had the perl module of ImageMagick, so I ran this command - slocate .so | grep perl

But I did not find anything that was related to ImageMagick. So I downloaded PerlMagick, which is the Perl module for ImageMagick, and created a directory for it under the ImageMagick directory, and then, included the paths for the Magick libraries (/usr/lib) in the INC and LIBS values.

Next I generates a Makefile by doing this -
perl Makefile

and then I did a - make

However it gave me this error -

[root@mydomain PerlMagick-5.56]# make
gcc -c -I../ -I.. -I/usr/include/freetype2 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I/usr/X11R6/include -I/usr/include/libxml2 -I/usr/lib -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -march=i386 -mcpu=i686 -g -DVERSION=\"5.56\" -DXS_VERSION=\"5.56\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" -DHAVE_CONFIG_H Magick.c
/bin/sh: line 1: gcc: command not found
make: *** [Magick.o] Error 127

I inferred from this that I don't have gcc on the server.

So what do I do about it?

Linux version - 9

Thanks.
 
Old 09-14-2003, 07:13 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You'll first need to install GCC and ALLLLLL of it's dependencies (there's a lot):
http://www.linuxquestions.org/questi...der=descending

The easiest way I'm aware of:
www.freshrpms.net
Grab/install apt and Synaptic, then use them to grab GCC and it's dependencies.

After that, instead of downloading perl modules and installing one by one, as root:
perl -MCPAN -e shell

Go through the one time setup, and then when you are done and arrive at a different looking command prompt, check the helpful for more info on using it. The quick and dirty:
install PerlMagick

That's the syntax, or should be if the CaSe is correct.

HTH

Cool
 
Old 09-14-2003, 07:33 AM   #3
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
Hi,
Okay, I am a new comer to Linux, and I am working on someone's else Linux box, which is important, and don't want to ruin something, because I don't know how to do it.
I went to - http://gcc.gnu.org/install/ to figure out a way to get gcc, but it sounded to complex to try it on a sensitive Linux machine. Sensitive as in - important.
So I guess I'll have to find some other way out.

Moreover from what you have said, I figured that, the APT(advanced package tool) would need to be used with Synaptic, which is a graphical tool. However I am remotely logging into a Linux machine using SSH, and am not sure how the Graphical Tool will work on my system.
Also a lot of Perl modules are already installed. Again I don't know if I am right, but wont using the perl -MCPAN -e shell command overwrite them?

The issue here is that the Linux box is not an experimenting tool for me.

Any suggestions?
Thanks
 
Old 09-14-2003, 07:37 AM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
If you need to install the Perl module another way, that's no problem, simply introducing you to the Perl shell was my intentions, possibly to help ease the way

And you don't HAVE to use Synaptic, that too was to ease the pain of the command line, but if you are ssh'ing, I'm going to assume you have a few tricks up your sleeve already Anyway, Synaptic is just a front end to apt, so...

apt-get install gcc

Should do it. You can also look at other options, but that seems to be the most prevelant around these parts

Cool
 
Old 09-14-2003, 07:45 AM   #5
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
Hi,
Thanks for the excellent reply. But as usual, this opens up another set of questions. So essentially I will have to install apt. Just a little bit of help needed here. The instructions say that I should install APT as root by doing this -

rpm -Uvh apt-*

What I wanted to know was, which directory is this to be done in.
Also, the apt-get install gcc would install gcc, but where?

Thanks.
 
Old 09-14-2003, 07:46 AM   #6
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
ps: i didnt understand what you meant by "but if you are ssh'ing, I'm going to assume you have a few tricks up your sleeve already"
 
Old 09-14-2003, 07:54 AM   #7
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Quote:
Originally posted by init-5
Hi,
Thanks for the excellent reply. But as usual, this opens up another set of questions. So essentially I will have to install apt. Just a little bit of help needed here. The instructions say that I should install APT as root by doing this -

rpm -Uvh apt-*

What I wanted to know was, which directory is this to be done in.
Also, the apt-get install gcc would install gcc, but where?

Thanks.
rpm -Uvh apt-* is bad, instead, from the command line, use AUTOCOMPLETE. This is done by typing the first few letters of the file to be installed:
rpm -Uvh apt-TAB
And then pressing TAB, such as I have idicated above, if the file that is going to be installed is indeed in the directory you are in, then it should autocomplete at that time.

Which directory should this be done in?
Whatever directory you download the RPM to. It's suggested to consistently use the same directory, sort of your local 'repository' of RPMs. But you could get away with puting it anywhere you have write priv's

Where does it get installed?
/usr/bin
However, that REALLY shouldn't matter to the average user. The main thing to note is that it gets installed into your system $PATH. This PATH variable is setup in /etc/profile as well as custom ones in your home directory in a file .bash_profile. Again, you don't need to worry about ANY of this, it's just an FYI kinda thing. To see your current PATH variable, at a prompt type:
echo $PATH
And it will list the directories it will search for binaries you should be able to execute as the current user.

HTH

Cool
 
Old 09-14-2003, 07:55 AM   #8
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Quote:
Originally posted by init-5
ps: i didnt understand what you meant by "but if you are ssh'ing, I'm going to assume you have a few tricks up your sleeve already"
If you are:
1. SSH'ing
2. Into someone else's box;
3. On a system that is a production (or non-test) box...

I'd think you'd have a bit of feel for what's going on in the dark (the terminal). No worries though, this is after all, the place where "Newbies" come for help, so you are definitely in the right place

Cool
 
Old 09-14-2003, 08:05 AM   #9
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by MasterC
If you are:
1. SSH'ing
2. Into someone else's box;
3. On a system that is a production (or non-test) box...

I'd think you'd have a bit of feel for what's going on in the dark (the terminal). No worries though, this is after all, the place where "Newbies" come for help, so you are definitely in the right place

Cool
lol. well I still couldn't figure out what you meant by that. But just to clarify,

1) SSH'ing - because there's three ways to access the machine - SSH, FTP and a Web Based interface. I know UNIX commands so SSH'ing seems the easiest to figure out (whatever's happening in the dark).
2) Into someone else's box - its a dedicated web server with a hosting company which charges exorbitantly for installing software. And this box is owned by my friend.
3) On a system that is a production (or non-test) box - well, i guess its a non test box. Dont know what's a production box.

Your replies were awsome. Thanks a lot.

Cool
 
Old 09-14-2003, 08:07 AM   #10
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by MasterC

Which directory should this be done in?
Whatever directory you download the RPM to. It's suggested to consistently use the same directory, sort of your local 'repository' of RPMs. But you could get away with puting it anywhere you have write priv's

Would (or actually) could this directory be - /usr/share since this is where ImageMagick and other softwares have been installed.
 
Old 09-14-2003, 08:13 AM   #11
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yes it 'could', but once you:
rpm -Uvh filename.rpm

A file, there is no need to keep the rpm around, the files will be copied to the system directories, and the RPM is simply taking up space. I suggest making a directory on your system for such things, maybe:
/usr/local/packages
OR
/usr/src/RPMS

?

Just ideas, but I tend to keep the old packages around 'just in case'. And because of that, I like to organize them in like packages, so RPMs (though I have none) would go in 1 directory, source in another, and so on. Mine are:
/home/packages (on my server)
/home/username/downloads (on my desktop)
Arbitrarily chosen, for no obvious reason.

Cool
 
Old 09-14-2003, 08:15 AM   #12
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
apt-get install gcc

This command gives the following error:

Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package gcc

Well?
 
Old 09-14-2003, 08:23 AM   #13
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Woohoo,

Well then, I do believe you have to setup a repository first, if you haven't yet done so. Check the man page that should have been installed with apt.

Since you don't have means to get to the Gui, I can only hope that you don't have to go through the pain in the arse of installing via rpm:
rpm -Uvh file1.rpm file2.rpm... file843.rpm

Not really, but to see what I mean grab:
ftp://distro.ibiblio.org/pub/linux/d...2.2-5.i386.rpm

The GCC RPM, and try:
rpm -Uvh filename.rpm
Where filename.rpm is the actual filename you download. Then, checkout the list of dependencies on that pup!

You should be able to/can grab them from the mirror:
ftp://distro.ibiblio.org/pub/linux/d...6/RedHat/RPMS/
And if you do, install them all on one line:
rpm -Uvh file1.rpm file2.rpm

And so on. Alternatively, an easier way to install all files on the same line is to make sure all the files needing to be installed are in a seperate directory of their own, then change into that directory and:
rpm -Uvh *



Good Luck!!!

Cool
 
Old 09-14-2003, 08:40 AM   #14
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
It says it requires 3 dependencies. So, would rpm -Uvh 'ing these three dependencies require more dependencies?

Thanks.
 
Old 09-14-2003, 08:57 AM   #15
init-5
Member
 
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41

Original Poster
Rep: Reputation: 15
Hi,
<Phew>
Just wanted to know that everything went great with GCC. Installed it. And then tried to run the Makefile for PerlMagick again and got hundreds of errors.
A sample =
Magick.xs:7679: `exception' undeclared (first use in this function)
Magick.xs:7684: `MaxTextExtent' undeclared (first use in this function)
Magick.xs:7684: dereferencing pointer to incomplete type
Magick.xs:7685: dereferencing pointer to incomplete type
Magick.xs:7686: `UndefinedException' undeclared (first use in this function)
Magick.xs: In function `XS_Image__Magick_Set':
Magick.xs:7799: `Image' undeclared (first use in this function)
Magick.xs:7814: `OptionError' undeclared (first use in this function)
Magick.xs: In function `XS_Image__Magick_Transform':
Magick.xs:7863: `ExceptionInfo' undeclared (first use in this function)
Magick.xs:7863: parse error before "exception"
Magick.xs:7869: `Image' undeclared (first use in this function)
Magick.xs:7870: `image' undeclared (first use in this function)
Magick.xs:7899: `OptionError' undeclared (first use in this function)
Magick.xs:7957: `exception' undeclared (first use in this function)
Magick.xs:7960: invalid lvalue in assignment
Magick.xs:7961: `UndefinedException' undeclared (first use in this function)
Magick.xs:7963: parse error before ')' token
Magick.xs:7967: request for member `next' in something not a structure or union
Magick.xs: In function `XS_Image__Magick_Write':
Magick.xs:8014: `MaxTextExtent' undeclared (first use in this function)
Magick.xs:8017: `Image' undeclared (first use in this function)
Magick.xs:8017: `image' undeclared (first use in this function)
Magick.xs:8018: `next' undeclared (first use in this function)
Magick.xs:8045: `OptionError' undeclared (first use in this function)
Magick.xs:8065: dereferencing pointer to incomplete type
Magick.xs:8065: dereferencing pointer to incomplete type


So, basically I am on square one.

Any more suggestions?
lol. I just need the Image:Magick module in Perl so that I can use it in the scripts.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Module Version on AS RH 3.0 brendskina Linux - Enterprise 2 06-13-2005 08:52 AM
Problem with perl module for w3c validator to work on my local Apache+PHP+perl instal tbamt Linux - Software 0 12-16-2004 06:37 PM
perl module installation black_man Slackware 2 10-17-2004 02:57 PM
Problems with installing GD perl module. Related to libgd installation. Chiabert Linux - Newbie 0 10-03-2003 02:19 PM
Perl/Tk module installation problem baddwolf Linux - Software 0 09-26-2003 12:11 AM


All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration