LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Pre-built package for Perl on Solaris 5.8 ? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/pre-built-package-for-perl-on-solaris-5-8-a-213916/)

Van Gogh 08-05-2004 03:23 PM

Pre-built package for Perl on Solaris 5.8 ?
 
Hi,

I wish to install a newer version of Perl (the old version is 5.003 or something) on Solaris 5.8. Hoever, I have little or no knowledge of Solaris. I was hoping I would be able to find a pre-built package for it but my google searches have not yielded anything. Basically, i wan to install a new version of Perl on a machine on which I do not have superuser priviledges.

Any help woul be appreciated.

Thanks in advance.

stickman 08-05-2004 03:39 PM

www.sunfreeware.com

You'll need root privs to install it though.

jlliagre 08-05-2004 03:56 PM

Most of Solaris packages can't be installed in a non root user owned directory, moreover, the pkgadd command is restricted to root.
Your best options are either to build perl from the source code, specifying an install directory of yours, or to forget about perl and use a real programming language ... :D

Van Gogh 08-09-2004 03:30 PM

Quote:

Originally posted by jlliagre
Most of Solaris packages can't be installed in a non root user owned directory, moreover, the pkgadd command is restricted to root.
Your best options are either to build perl from the source code, specifying an install directory of yours, or to forget about perl and use a real programming language ... :D

Thanks. I tried to build Perl from the sourcecode and I get some errors. I think I am probably not setting the path correctly. Some of the errors I get are as follows.

NDBM_File.xs:4: ndbm.h: Permission denied
NDBM_File.xs:7: parse error before `DBM'
NDBM_File.xs:7: warning: no semicolon at end of struct or union
NDBM_File.xs:13: parse error before `}'
NDBM_File.xs:13: warning: data definition has no type or storage class
NDBM_File.xs:15: parse error before `*'
NDBM_File.xs:15: warning: data definition has no type or storage class
NDBM_File.xs:16: parse error before `datum_key'
NDBM_File.xs:16: warning: data definition has no type or storage class
NDBM_File.xs:17: parse error before `datum_value'
NDBM_File.xs:17: warning: data definition has no type or storage class
NDBM_File.c: In function `XS_NDBM_File_TIEHASH':
NDBM_File.c:40: `NDBM_File' undeclared (first use in this function)
NDBM_File.c:40: (Each undeclared identifier is reported only once
NDBM_File.c:40: for each function it appears in.)
NDBM_File.c:40: parse error before `RETVAL'
NDBM_File.xs:29: `DBM' undeclared (first use in this function)
NDBM_File.xs:29: `dbp' undeclared (first use in this function)
NDBM_File.xs:31: `RETVAL' undeclared (first use in this function)
NDBM_File.xs:33: parse error before `Perl_safesysmalloc'
NDBM_File.c: In function `XS_NDBM_File_DESTROY':
NDBM_File.c:67: `NDBM_File' undeclared (first use in this function)
NDBM_File.c:67: parse error before `db'
NDBM_File.c:71: `db' undeclared (first use in this function)
NDBM_File.c: In function `XS_NDBM_File_FETCH':
NDBM_File.c:91: `NDBM_File' undeclared (first use in this function)
NDBM_File.c:91: parse error before `db'

-----------------------------------------------------------------------------------

I see that most of the errors have to do NDBM_File. Could someone please help?

Thanks in advance.

jlliagre 08-09-2004 04:03 PM

The first error is usually the one to focus on:

NDBM_File.xs:4: ndbm.h: Permission denied

What gives this command ?

ls -l /usr/include/ndbm.h

Van Gogh 08-09-2004 05:00 PM

Quote:

Originally posted by jlliagre
The first error is usually the one to focus on:

NDBM_File.xs:4: ndbm.h: Permission denied

What gives this command ?

ls -l /usr/include/ndbm.h

It gives the following.

-rw-r--r-- 1 root 3141 Jan 5 2000 /usr/include/ndbm.h


So I guess only root has permission to do anything with it!

jlliagre 08-10-2004 02:06 AM

Well, this is weird, you have the right to read this file and this must be enough.
There's no readon I see that can justify perl to modify ndbm.h, as it is a standard system file.
Perhaps copying ndbm.h to a directory you own, and telling the perl builder to look at this directory first (I don't known if this is doable) may help.

Van Gogh 08-10-2004 11:06 PM

Quote:

Originally posted by jlliagre
Well, this is weird, you have the right to read this file and this must be enough.
There's no readon I see that can justify perl to modify ndbm.h, as it is a standard system file.
Perhaps copying ndbm.h to a directory you own, and telling the perl builder to look at this directory first (I don't known if this is doable) may help.

Thanks. Copying to my home directory worked. Now the only problem seems to be that the older version that is installed system-wide is still the default one, if you know what I mean. If I do perl -v the old version shows up. Where exactly should I indicate the complete path to my home directory so that I can run the new version in my home directory.
Sorry if these questions sound naive. I have no experience with these things.

jlliagre 08-11-2004 02:51 AM

There are no naive questions. :)

Create a bin directory in your home, copy your binary in it, then add this to your .profile (or .bash_profile):

PATH=~/bin:$PATH

Van Gogh 08-12-2004 03:54 PM

Thanks again but it doesn't seem to work. I am using a tcsh shell and I copied the code you suggested to the .bashrc file. That didn't work.

jlliagre 08-12-2004 04:23 PM

As its name suggests, .bashrc is for bash.

For tcsh, you have to set the path in .tcshrc:
Probably something like:
set path=( ~/bin $path )

Not really sure for the syntax, I left csh a long time ago to ksh.

Van Gogh 08-12-2004 10:10 PM

Quote:

Originally posted by jlliagre
As its name suggests, .bashrc is for bash.

For tcsh, you have to set the path in .tcshrc:
Probably something like:
set path=( ~/bin $path )

Not really sure for the syntax, I left csh a long time ago to ksh.

Thanks. Everything is in order now.


All times are GMT -5. The time now is 02:13 PM.