X-88 Posted July 25, 2013 Share Posted July 25, 2013 hi guys, I'm newbie on linux OS, I had a few days to try linux OS, I'm having trouble installing Free Pascal/FPC on Linux OS. What should I do after a message appeared on the Picture? I typed: sh /root/Desktop/fpc-2.6.2.i386-linux/fpc-2.6.2.i386-linux/install.sh then display a message: This shell script will attempt to install the Free Pascal Compiler version 2.6.2 with the items you select Install prefix (/usr or /usr/local) [/usr]: then I type it again: /Free Pascal Compiler then display a message: No native FPC found. For a proper installation of a cross FPC the installation of a native FPC is required. root@bt:~#after the a display this message, I'm confused as to what I should do, so how do I install it properly using the terminal without an internet connection?help me please, n sorry about my English!. #I've asked this elsewhere, but they are closing this question . thx b4 Link to comment Share on other sites More sharing options...
redblkjck Posted July 25, 2013 Share Posted July 25, 2013 try without using full path in the cmd. cd /root/Desktop/fpc-2.6.2.i386-linux/fpc-2.6.2.i386-linux./install.sh Link to comment Share on other sites More sharing options...
X-88 Posted July 25, 2013 Author Share Posted July 25, 2013 (edited) thank you for replying.I've tried that you suggest but it appears: bash: cd: / usr / local / FPC / install.sh: Not a directoryI've put it in the directory: / usr / local / FPCbut still. I was baffled by the linux installer, huh... or is there any easy way that I can set automatically from this code?thanks. #!/usr/bin/env bash## Free Pascal installation script for Unixy platforms.# Copyright 1996-2004 Michael Van Canneyt, Marco van de Voort and Peter Vreman## Don't edit this file.# Everything can be set when the script is run.## Release Version will be replaced by makepackVERSION=2.6.2FULLVERSION=2.6.2# some useful functions# ask displays 1st parameter, and ask new value for variable, whose name is# in the second parameter.ask (){askvar=$2eval old=\$$askvareval printf \""$1 [$old] : "\"read $askvareval test -z \"\$$askvar\" && eval $askvar=\'$old\'}# yesno gives 1 on no, 0 on yes $1 gives text to display.yesno (){while true; doprintf "$1 (Y/n) ? "read anscase X"$ans" inX|Xy|XY) return 0;;Xn|XN) return 1;;esacdone}# Untar files ($3,optional) from file ($1) to the given directory ($2)unztar (){tar -xzf "$HERE/$1" -C "$2" $3}# Untar tar.gz file ($2) from file ($1) and untar result to the given directory ($3)unztarfromtar (){tar -xOf "$HERE/$1" "$2" | tar -C "$3" -xzf -}# Get file list from tar archive ($1) in variable ($2)# optionally filter result through sed ($3)listtarfiles (){askvar="$2"if [ ! -z "$3" ]; thenlist=`tar tvf "$1" | awk '{ print $(NF) }' | sed -n /"$3"/p`elselist=`tar tvf "$1" | awk '{ print $(NF) }'`fieval $askvar='$list'}# Make all the necessary directories to get $1makedirhierarch (){mkdir -p "$1"}# check to see if something is in the pathcheckpath (){ARG="$1"OLDIFS="$IFS"; IFS=":";eval set "$PATH";IFS="$OLDIFS"for idoif [ "$i" = "$ARG" ]; thenreturn 0fidonereturn 1}# Install files from binary-*.tar# $1 = cpu-target# $2 = cross prefixinstallbinary (){if [ "$2" = "" ]; thenFPCTARGET="$1"CROSSPREFIX=elseFPCTARGET=`echo $2 | sed 's/-$//'`CROSSPREFIX="$2"fiBINARYTAR="${CROSSPREFIX}binary.$1.tar"# conversion from long to short archname for ppc<x>case $FPCTARGET inm68k*)PPCSUFFIX=68k;;sparc*)PPCSUFFIX=sparc;;i386*)PPCSUFFIX=386;;powerpc64*)PPCSUFFIX=ppc64;;powerpc*)PPCSUFFIX=ppc;;arm*)PPCSUFFIX=arm;;x86_64*)PPCSUFFIX=x64;;mips*)PPCSUFFIX=mips;;ia64*)PPCSUFFIX=ia64;;alpha*)PPCSUFFIX=axp;;esac# Install compiler/RTL. Mandatory.echo "Installing compiler and RTL for $FPCTARGET..."unztarfromtar "$BINARYTAR" "${CROSSPREFIX}base.$1.tar.gz" "$PREFIX"if [ -f "binutils-${CROSSPREFIX}$1.tar.gz" ]; thenif yesno "Install Cross binutils"; thenunztar "binutils-${CROSSPREFIX}$1.tar.gz" "$PREFIX"fifi# Install symlinkrm -f "$EXECDIR/ppc${PPCSUFFIX}"ln -sf "$LIBDIR/ppc${PPCSUFFIX}" "$EXECDIR/ppc${PPCSUFFIX}"echo "Installing utilities..."unztarfromtar "$BINARYTAR" "${CROSSPREFIX}utils.$1.tar.gz" "$PREFIX"# Should this be here at all without a big Linux test around it?if [ "x$UID" = "x0" ]; thenchmod u=srx,g=rx,o=rx "$PREFIX/bin/grab_vcsa"fiide=`tar -tf $BINARYTAR | grep "${CROSSPREFIX}ide.$1.tar.gz"`if [ "$ide" = "${CROSSPREFIX}ide.$1.tar.gz" ]; thenif yesno "Install Textmode IDE"; thenunztarfromtar "$BINARYTAR" "${CROSSPREFIX}ide.$1.tar.gz" "$PREFIX"fifiif yesno "Install FCL"; thenlisttarfiles "$BINARYTAR" packages unitsfor f in $packagesdoif echo "$f" | grep -q fcl > /dev/null ; thenp=`echo "$f" | sed -e 's+^.*units-\([^\.]*\)\..*+\1+'`echo "Installing $p"unztarfromtar "$BINARYTAR" "$f" "$PREFIX"fidonefiif yesno "Install packages"; thenlisttarfiles "$BINARYTAR" packages unitsfor f in $packagesdoif ! echo "$f" | grep -q fcl > /dev/null ; thenp=`echo "$f" | sed -e 's+^.*units-\([^\.]*\)\..*+\1+'`echo "Installing $p"unztarfromtar "$BINARYTAR" "$f" "$PREFIX"fidonefirm -f *."$1".tar.gz}# --------------------------------------------------------------------------# welcome message.#clearecho "This shell script will attempt to install the Free Pascal Compiler"echo "version $FULLVERSION with the items you select"echo# Here we start the thing.HERE=`pwd`OSNAME=`uname -s | tr A-Z a-z`case "$OSNAME" inhaiku)# Install in /boot/common or /boot/home/config ?if checkpath /boot/common/bin; thenPREFIX=/boot/commonelsePREFIX=/boot/home/configfi;;freebsd)PREFIX=/usr/local;;*)# Install in /usr/local or /usr ?if checkpath /usr/local/bin; thenPREFIX=/usr/localelsePREFIX=/usrfi;;esac# If we can't write on prefix, select subdir of home dirif [ ! -w "$PREFIX" ]; thenPREFIX="$HOME/fpc-$VERSION"ficase "$OSNAME" inhaiku)ask "Install prefix (/boot/common or /boot/home/config) " PREFIX;;*)ask "Install prefix (/usr or /usr/local) " PREFIX;;esac# Support ~ expansionPREFIX=`eval echo $PREFIX`export PREFIXmakedirhierarch "$PREFIX"# Set some defaults.LIBDIR="$PREFIX/lib/fpc/$VERSION"SRCDIR="$PREFIX/src/fpc-$VERSION"EXECDIR="$PREFIX/bin"BSDHIER=0case "$OSNAME" in*bsd)BSDHIER=1;;esacSHORTARCH="$ARCHNAME"FULLARCH="$ARCHNAME-$OSNAME"DOCDIR="$PREFIX/share/doc/fpc-$VERSION"case "$OSNAME" infreebsd)# normal examples are already installed in fpc-version. So added "demo"DEMODIR="$PREFIX/share/examples/fpc-$VERSION/demo";;*)DEMODIR="$DOCDIR/examples";;esac# Install all binary releasesfor f in *binary*.tardotarget=`echo $f | sed 's+^.*binary\.\(.*\)\.tar$+\1+'`cross=`echo $f | sed 's+binary\..*\.tar$++'`# cross install?if [ "$cross" != "" ]; thenif [ "`which fpc 2>/dev/null`" = '' ]; thenecho "No native FPC found."echo "For a proper installation of a cross FPC the installation of a native FPC is required."exit 1elseif [ `fpc -iV` != "$VERSION" ]; thenecho "Warning: Native and cross FPC doesn't match; this could cause problems"fififiinstallbinary "$target" "$cross"doneecho Done.echo# Install the documentation. Optional.if [ -f doc-pdf.tar.gz ]; thenif yesno "Install documentation"; thenecho Installing documentation in "$DOCDIR" ...makedirhierarch "$DOCDIR"unztar doc-pdf.tar.gz "$DOCDIR" "--strip 1"echo Done.fifiecho# Install the demos. Optional.if [ -f demo.tar.gz ]; thenif yesno "Install demos"; thenask "Install demos in" DEMODIRecho Installing demos in "$DEMODIR" ...makedirhierarch "$DEMODIR"unztar demo.tar.gz "$DEMODIR"echo Done.fifiecho# Install /etc/fpc.cfg, this is done using the samplecfg scriptif [ "$cross" = "" ]; then"$LIBDIR/samplecfg" "$LIBDIR"elseecho "No fpc.cfg created because a cross installation has been done."fi# The Endechoecho End of installation.echoecho Refer to the documentation for more information.echo Edited July 25, 2013 by X-88 Link to comment Share on other sites More sharing options...
redblkjck Posted July 27, 2013 Share Posted July 27, 2013 (edited) edit. hmm part of the message disappeared again when using modified links. trying again without the modified links to the post...BackTrack is Debian based. Try grabbing the DEB packages instead, here is post where someone else installed it.http://forum.lazarus.freepascal.org/index.php?topic=19471.0step 3 for manual install with dpkg. new version posted since that post (Lazarus 1.0.10) but still grab all 3 of the files, just choose proper version, amd64 or i386 release. I have BT image on a usb stick somewhere I can test it but not until after this weekend.If you can get BT networked, apt-get is your friend. http://www.backtrack-linux.org/wiki/index.php/Basic_Usage#Common_apt_commands- jack Edited July 27, 2013 by redblkjck Link to comment Share on other sites More sharing options...
X-88 Posted July 27, 2013 Author Share Posted July 27, 2013 a few days ago I tried to join the forum(lazarus), but I enter the captcha correctly, up to 8x. but I get a message incorect captcha. then I cancel the join in the forum I modify the name of the folder that I'm typing rather short, but I did not find the file (*.deb) when I downloaded the file. I know how to install using the internet connection but I only run it on a Virtual Machine, so maybe when I will install it again when I'm not using the internet connection I felt would be difficult. thanks for the reply, and I will visited link, which you suggest. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now