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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
09-14-2003, 06:08 AM
|
#1
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Rep:
|
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.
|
|
|
|
09-14-2003, 06:13 AM
|
#2
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 06:33 AM
|
#3
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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
|
|
|
|
09-14-2003, 06:37 AM
|
#4
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 06:45 AM
|
#5
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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.
|
|
|
|
09-14-2003, 06:46 AM
|
#6
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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"
|
|
|
|
09-14-2003, 06:54 AM
|
#7
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 06:55 AM
|
#8
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 07:05 AM
|
#9
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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 
|
|
|
|
09-14-2003, 07:07 AM
|
#10
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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.
|
|
|
|
09-14-2003, 07:13 AM
|
#11
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 07:15 AM
|
#12
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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?
|
|
|
|
09-14-2003, 07:23 AM
|
#13
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
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
|
|
|
|
09-14-2003, 07:40 AM
|
#14
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
It says it requires 3 dependencies. So, would rpm -Uvh 'ing these three dependencies require more dependencies?
Thanks.
|
|
|
|
09-14-2003, 07:57 AM
|
#15
|
|
Member
Registered: Sep 2003
Location: SJ
Distribution: RHL 9, Solaris 9
Posts: 41
Original Poster
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:58 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|