LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2009, 09:51 AM   #1
rantastic
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Rep: Reputation: 0
Problem installing ghostscript on web server (Linux 2.6.9-023stab048.4-smp)


Hello all,

I am attempting to install ghostscript on our web server so I can install html2pdf and automatically print a pdf from one of our report creation sites. I have run into some trouble and am getting in a little over my head. I have very little experience with Unix commands(but am certainly getting a crash course in it recently).

I got up to the step were I put in the command "make ghostscript-8.70" and get this error
------------------------------------------
[root@xxxxxxx src]# cd ghostscript-8.70
[root@xxxxxxx ghostscript-8.70]# make
gcc -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long int" -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long int" -I./base -I./obj/ -Izlib ./base/mkromfs.c -o ./obj/mkromfs ./obj/compress.o ./obj/deflate.o ./obj/zutil.o ./obj/adler32.o ./obj/crc32.o ./obj/trees.o ./obj/gscdefs.o ./obj/gsmisc.o ./obj/gpmisc.o ./obj/gslibctx.o ./obj/gp_getnv.o ./obj/gp_unix.o ./obj/gp_unifs.o ./obj/gp_unifn.o ./obj/gp_stdia.o ./obj/gsutil.o -lm -ldl -lm -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [obj/mkromfs] Error 1
------------------------------------------

I did some reasearch and looked up the lstdc++ file which 'should' be in the /usr/bin/ld directory. I found this command which gave me some info on it.

------------------------------------------
[root@xxxxxxx usr]# rpm -q -i --provides -l libstdc++
Name : libstdc++ Relocations: (not relocatable)
Version : 4.1.2 Vendor: Red Hat, Inc.
Release : 13.fc6 Build Date: Wed Jun 27 18:02:31 2007
Install Date: Fri Mar 6 13:36:03 2009 Build Host: hs20-bc1-7.build.redhat.com
Group : System Environment/Libraries Source RPM: gcc-4.1.2-13.fc6.src.rpm
Size : 973680 License: GPL
Signature : DSA/SHA1, Mon Jul 2 10:33:41 2007, Key ID b44269d04f2a6fd2
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://gcc.gnu.org
Summary : GNU Standard C++ Library
Description :
The libstdc++ package contains a rewritten standard compliant GCC Standard
C++ Library.
libstdc++ = 4.1.1-52.fc6
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.1)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.1)(64bit)
libstdc++.so.6(GLIBCXX_3.4.2)(64bit)
libstdc++.so.6(GLIBCXX_3.4.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.5)(64bit)
libstdc++.so.6(GLIBCXX_3.4.6)(64bit)
libstdc++.so.6(GLIBCXX_3.4.7)(64bit)
libstdc++.so.6(GLIBCXX_3.4.8)(64bit)
libstdc++ = 4.1.2-13.fc6
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.8
Name : libstdc++ Relocations: (not relocatable)
Version : 4.1.2 Vendor: Red Hat, Inc.
Release : 13.fc6 Build Date: Wed Jun 27 17:58:39 2007
Install Date: Fri Mar 6 13:50:46 2009 Build Host: ls20-bc1-14.build.redhat.com
Group : System Environment/Libraries Source RPM: gcc-4.1.2-13.fc6.src.rpm
Size : 925520 License: GPL
Signature : DSA/SHA1, Mon Jul 2 10:32:37 2007, Key ID b44269d04f2a6fd2
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://gcc.gnu.org
Summary : GNU Standard C++ Library
Description :
The libstdc++ package contains a rewritten standard compliant GCC Standard
C++ Library.
libstdc++ = 4.1.1-52.fc6
libstdc++.so.6
libstdc++.so.6(CXXABI_1.3)
libstdc++.so.6(CXXABI_1.3.1)
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.1)
libstdc++.so.6(GLIBCXX_3.4.2)
libstdc++.so.6(GLIBCXX_3.4.3)
libstdc++.so.6(GLIBCXX_3.4.4)
libstdc++.so.6(GLIBCXX_3.4.5)
libstdc++.so.6(GLIBCXX_3.4.6)
libstdc++.so.6(GLIBCXX_3.4.7)
libstdc++.so.6(GLIBCXX_3.4.8)
libstdc++ = 4.1.2-13.fc6
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.8
------------------------------------------

So I figured ghostscript was just looking in the wrong place. the file was in /usr/lib/ not /usr/bin/ld. So I did some more reading and found you could link folders and linked the one ghostscript was looking in with the one the file was actually in and got this

------------------------------------------
ln: creating symbolic link `./liblstdc++' to `/usr/lib/liblstdc++': File exists
------------------------------------------

I then tried to 'make' ghostscript again, but got the same error. I can't find any more info this problem and was hoping someone here could tell me what I'm doing wrong.

Thanks,
-Bill
 
Old 12-11-2009, 01:28 PM   #2
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Mandriva 2010.2
Posts: 148

Rep: Reputation: 24
You first have to use
Code:
./configure
before make and make installhttp://svn.ghostscript.com/ghostscri...s/doc/Make.htm

Last edited by Davno; 12-11-2009 at 01:30 PM.
 
Old 12-11-2009, 01:43 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
Welcome to LQ.

Quote:
/usr/bin/ld: cannot find -lstdc++
Looking for / asking for lstdc++ means the development
lib = libstdc++.so from libstdc++-devel-3.4.3-22.1.i386
if you have RH EL4.x or CentOS 4.x.
libstdc++.so is a link to libstdc++.so.6.0.3

The package(s) ghostscript* can be installed from the
package manager too. ( EL 4 version = 7.07 ).
.....
.....

html2fpdf http://www.fpdf.org/
http://sourceforge.net/projects/html2fpdf/files/
.....
 
Old 12-11-2009, 02:31 PM   #4
rantastic
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
@davno, I did complete the ./configure step

@knudfl

Thanks,

I'm a little confused about your post though (sorry everything I know about linux/unix stuff I've learned in the past few days). Did you mean that I am linking to the wrong file? And I should link to the one in the devel directory?

How do I install from the package manager? Do you know of any guides?

I've read about fpdf but read that Ghostscript was better...There are also some other php scripts I was told require ghostscript if I wanted an alternative to htm2pdf.
 
Old 12-11-2009, 05:08 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
.. What have you got ? Redhat EL 4 ?
The command : cat /etc/redhat-release
.. will show the version, Redhat or CentOS <release>.


The link libstdc++.so has a location like :
/usr/lib/gcc/i386-redhat-linux/3.4.x

The "Real name" library is here : /usr/lib/
You can make a link, if no other 'libstdc++.so' is present in /usr/lib/.
1) cd /usrlib/
2) su password
3) ln -s libstdc++.so.6.0.3 libstdc++.so
( Please replace with actual file name.)

The linker will use libstdc++.so only at compile time.
'libstdc++.so.6' is the runtime library. ( "so name" ).
It's about choice : 2..3 similar lbstdc++'s can be present
at the same time, you / the program decides, which to use
at compile / linking time. Hence the suffix ' .so '. ( "devel link" ).

The latest versions for EL 4 :
libstdc++-3.4.6-11 libstdc++-devel-3.4.6
.....
.....

Finding the Package Manager :
( Menu ) > > System > Add Remove Software
or
Programs > Add Remove Software
If it's Redhat EL, and you paid for support, it works, else not.
The free version of RH EL is CentOS.
.....

Last edited by knudfl; 12-11-2009 at 05:18 PM.
 
  


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
I have some problem on my Linux Web server log file. ERBRMN Linux - General 5 11-11-2005 08:37 AM
Problem with Linux RH 5 Web Server... JBF Linux - Networking 15 08-25-2003 01:50 PM


All times are GMT -5. The time now is 12:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration