免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1793 | 回复: 7

一个软件的编译安装的出错信息,请各位大侠帮帮忙,我该怎么办?急呀! [复制链接]

论坛徽章:
0
发表于 2006-03-29 17:25 |显示全部楼层
在对一个软件编译安装时,我执行./configure和sh build.sh都没有问题,但是我接着执行了make install时出现下面信息:
#make install
/bin/sh ./mkinstalldirs /usr/local/bin /usr/local/info /usr/local/man/man1
cd glob; make CC='gcc' CFLAGS=' -g -I .. ' \
CPPFLAGS=' -DHAVE_CONFIG_H' \
RANLIB=' ranlib' \
libglob.a
' libglob.a' is up to date.
./install.sh -c make /usr/local/bin/make.new
mksh: Fatal error: Cannot load command './install.sh': Bad file number
current working directory /export/home/wsq/moecode/src/make-3.71
*** Error code 1
make: Fatal error : Command failed for target '/usr/local/bin/make'
我不知道到底是哪出错了,下面应该怎么做了,请各位帮帮忙吧.

论坛徽章:
0
发表于 2006-03-29 17:26 |显示全部楼层

修改了Makefile文件后,再执行make install还是出错,该怎么做呀?大家帮忙看看吧.

上面的执行了make install后的出错信息中的
mksh: Fatal error: Cannot load command './install.sh': Bad file number
我觉得应该是说./install.sh这个命令是错的,系统不认识(因为我的系统是solaris 8,可能不认识./这个执行命令,但认识sh这个执行命令),所以我就把Makefile文件中的INSTALL = ./install.sh -c这一行改成了INSTALL = sh install.sh -c.
然后我又执行了make install,显示下面信息:
/bin/sh ./mkinstalldirs /usr/local/bin /usr/local/info /usr/local/man/man1
cd glob; make CC='gcc' CFLAGS=' -g -I .. ' \
CPPFLAGS=' -DHAVE_CONFIG_H' \
RANLIB=' ranlib' \
libglob.a
' libglob.a' is up to date.
sh install.sh -c make /usr/local/bin/make.new
rm -f /usr/local/bin/make.old
mv /usr/loca/bin/make /usr/local/bin/make.old
mv /usr/local/bin/make.new /usr/local/bin/make
makeinfo -I. ./make.texinfo -o make.info
./make.texinfo: 7654: warning: @strong{Note ...} produces a spurious cross-reference in Info; reword to avoid that.
if [ -r ./make.info ]; then dir=. ; else dir=. ; fi; \
for file in ${dir}/make.info*; do \
name =" ' basename $file' " ; \
sh install.sh -c -m 644 $file \
'echo /usr/local/info/make.info | sed "s, make.info\$, $name, " ' ; \
done
if /bin/sh -c ' install-info --version' > /dev/null 2>&1; then \
install-info --infodir=/usr/local/info $dir/make.info; \
else true ; fi
install-info: No such file or directory for /make.info
*** Error code 1
make: Fatal error : Command failed for target '/usr/local/info/make.info'
就显示上面的提示信息.我从网上下载了texinfo软件包了呀,然后我就安装了texinfo软件包,可是怎么还会出现上面的错误呢,大家快帮我看看吧.

论坛徽章:
0
发表于 2006-03-30 09:17 |显示全部楼层
没有make.info这个文件,或$dir不对(可能前面的设置有问题)

论坛徽章:
0
发表于 2006-03-31 14:33 |显示全部楼层
在我要安装的这个软件中有make.info这个文件(和Makefile在同一个目录下)呀.

论坛徽章:
0
发表于 2006-04-05 09:32 |显示全部楼层
怎么没人回我呀,着急呀,大家帮帮忙了.拜托了,不胜感激!

论坛徽章:
0
发表于 2006-04-05 09:40 |显示全部楼层
你在编译什么软件,可以找一个已经编译好的。

论坛徽章:
0
发表于 2006-04-18 09:40 |显示全部楼层

我都快愁死了,大家快帮帮忙吧,拜托各位了。

这次我执行了make install,显示下面信息:
/bin/sh ./mkinstalldirs /usr/local/bin /usr/local/info /usr/local/man/man1
cd glob; make CC='gcc' CFLAGS=' -g -I .. ' \
CPPFLAGS=' -DHAVE_CONFIG_H' \
RANLIB=' ranlib' \
libglob.a
' libglob.a' is up to date.
sh install.sh -c make /usr/local/bin/make.new
rm -f /usr/local/bin/make.old
mv /usr/loca/bin/make /usr/local/bin/make.old
mv /usr/local/bin/make.new /usr/local/bin/make
makeinfo -I. ./make.texinfo -o make.info
./make.texinfo: 7654: warning: @strong{Note ...} produces a spurious cross-reference in Info; reword to avoid that.
if [ -r ./make.info ]; then dir=. ; else dir=. ; fi; \
for file in ${dir}/make.info*; do \
name =" ' basename $file' " ; \
sh install.sh -c -m 644 $file \
'echo /usr/local/info/make.info | sed "s, make.info\$, $name, " ' ; \
done
if /bin/sh -c ' install-info --version' > /dev/null 2>&1; then \
install-info --infodir=/usr/local/info $dir/make.info; \
else true ; fi
install-info: warning: no info dir entry in '/make.info'.
这是什么意思呀,还是在说找不到make.info文件吗?我已经看了几遍我的install.sh文件了,可是就是看不懂,大家帮我看看吧,到底问题出在哪?下面是我的install.sh文件
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in
        -c) instcmd="$cpprog"
            shift
            continue;;

        -d) dir_arg=true
            shift
            continue;;

        -m) chmodcmd="$chmodprog $2"
            shift
            shift
            continue;;

        -o) chowncmd="$chownprog $2"
            shift
            shift
            continue;;

        -g) chgrpcmd="$chgrpprog $2"
            shift
            shift
            continue;;

        -s) stripcmd="$stripprog"
            shift
            continue;;

        -t=*) transformarg=`echo $1 | sed 's/-t=//'`
            shift
            continue;;

        -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
            shift
            continue;;

        *)  if [ x"$src" = x ]
            then
                src=$1
            else
                # this colon is to work around a 386BSD /bin/sh bug
                :
                dst=$1
            fi
            shift
            continue;;
    esac
done

if [ x"$src" = x ]
then
        echo "install:        no input file specified"
        exit 1
else
        true
fi

if [ x"$dir_arg" != x ]; then
        dst=$src
        src=""
       
        if [ -d $dst ]; then
                instcmd=:
        else
                instcmd=mkdir
        fi
else

# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.

        if [ -f $src -o -d $src ]
        then
                true
        else
                echo "install:  $src does not exist"
                exit 1
        fi
       
        if [ x"$dst" = x ]
        then
                echo "install:        no destination specified"
                exit 1
        else
                true
        fi

# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

        if [ -d $dst ]
        then
                dst="$dst"/`basename $src`
        else
                true
        fi
fi

## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

# Make sure that the destination directory exists.
#  this part is taken from Noah Friedman's mkinstalldirs script

# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='       
'
IFS="${IFS-${defaultIFS}}"

oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"

pathcomp=''

while [ $# -ne 0 ] ; do
        pathcomp="${pathcomp}${1}"
        shift

        if [ ! -d "${pathcomp}" ] ;
        then
                $mkdirprog "${pathcomp}"
        else
                true
        fi

        pathcomp="${pathcomp}/"
done
fi

if [ x"$dir_arg" != x ]
then
        $doit $instcmd $dst &&

        if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
        if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
        if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
        if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else

# If we're going to rename the final executable, determine the name now.

        if [ x"$transformarg" = x ]
        then
                dstfile=`basename $dst`
        else
                dstfile=`basename $dst $transformbasename |
                        sed $transformarg`$transformbasename
        fi

# don't allow the sed command to completely eliminate the filename

        if [ x"$dstfile" = x ]
        then
                dstfile=`basename $dst`
        else
                true
        fi

# Make a temp file name in the proper directory.

        dsttmp=$dstdir/#inst.$$#

# Move or copy the file name to the temp name

        $doit $instcmd $src $dsttmp &&

        trap "rm -f ${dsttmp}" 0 &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

        if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
        if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
        if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
        if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&

# Now rename the file to the real destination.

        $doit $rmcmd -f $dstdir/$dstfile &&
        $doit $mvcmd $dsttmp $dstdir/$dstfile

fi &&

exit 0
到此install.sh文件结束了。
下面的是Makefile文件:
# Generated automatically from Makefile.in by configure.
# NOTE: If you have no `make' program at all to process this makefile, run
# `build.sh' instead.
#
# Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Make is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Make; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

#
#        Makefile for GNU Make
#

# Ultrix 2.2 make doesn't expand the value of VPATH.
# This must repeat the value, because configure will remove `VPATH = .'.
srcdir = .

CC = gcc

CFLAGS = -g
LDFLAGS = -g

# How to invoke ranlib.  This is only used by the `glob' subdirectory.
RANLIB = ranlib

# Define these for your system as follows:
#        -DNO_ARCHIVES                To disable `ar' archive support.
#        -DNO_FLOAT                To avoid using floating-point numbers.
#        -DENUM_BITFIELDS        If the compiler isn't GCC but groks enum foo:2.
#                                Some compilers apparently accept this
#                                without complaint but produce losing code,
#                                so beware.
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
# See also `config.h'.
defines = -DHAVE_CONFIG_H -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"

# Which flavor of remote job execution support to use.
# The code is found in `remote-$(REMOTE).c'.
REMOTE = stub

# If you are using the GNU C library, or have the GNU getopt functions in
# your C library, you can comment these out.
GETOPT = getopt.o getopt1.o
GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h

# If you are using the GNU C library, or have the GNU glob functions in
# your C library, you can comment this out.  GNU make uses special hooks
# into the glob functions to be more efficient (by using make's directory
# cache for globbing), so you must use the GNU functions even if your
# system's C library has the 1003.2 glob functions already.  Also, the glob
# functions in the AIX and HPUX C libraries are said to be buggy.
GLOB = glob/libglob.a

# If your system doesn't have alloca, or the one provided is bad, define this.
ALLOCA =
ALLOCA_SRC = $(srcdir)/alloca.c

# If your system needs extra libraries loaded in, define them here.
# System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
# libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
# alloca.c instead on those machines.
LOADLIBES =  -lkvm

# Any extra object files your system needs.
extras =

# Common prefix for machine-independent installed files.
prefix = /usr/local
# Common prefix for machine-dependent installed files.
exec_prefix = $(prefix)

# Directory to install `make' in.
bindir = $(exec_prefix)/bin
# Directory to find libraries in for `-lXXX'.
libdir = $(exec_prefix)/lib
# Directory to search by default for included makefiles.
includedir = $(prefix)/include
# Directory to install the Info files in.
infodir = $(prefix)/info
# Directory to install the man page in.
mandir = $(prefix)/man/man$(manext)
# Number to put on the man page filename.
manext = 1
# Prefix to put on installed `make' binary file name.
binprefix =
# Prefix to put on installed `make' man page file name.
manprefix = $(binprefix)

# Whether or not make needs to be installed setgid.
# The value should be either `true' or `false'.
# On many systems, the getloadavg function (used to implement the `-l'
# switch) will not work unless make is installed setgid kmem.
install_setgid = false
# Install make setgid to this group so it can read /dev/kmem.
group =

# Program to install `make'.
INSTALL_PROGRAM = ${INSTALL}
# Program to install the man page.
INSTALL_DATA = ${INSTALL} -m 644
# Generic install program.
INSTALL = ./install.sh -c

# Program to format Texinfo source into Info files.
MAKEINFO = makeinfo
# Program to format Texinfo source into DVI files.
TEXI2DVI = texi2dvi

# Programs to make tags files.
ETAGS = etags -tw
CTAGS = ctags -tw

objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o        \
       rule.o implicit.o default.o variable.o expand.o function.o        \
       vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o        \
       $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c                \
       $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c                \
       $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c                \
       $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c        \
       $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c        \
       $(srcdir)/vpath.c $(srcdir)/version.c                                \
       $(srcdir)/remote-$(REMOTE).c                                        \
       $(srcdir)/ar.c $(srcdir)/arscan.c                                \
       $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC)                \
       $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h                \
       $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h                \
       $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in


.SUFFIXES:
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo

all: make
check: # No tests.
info: make.info
dvi: make.dvi
# Some makes apparently use .PHONY as the default goal is it is before `all'.
.PHONY: all check info dvi

make.info: make.texinfo
        $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info

make.dvi: make.texinfo
        $(TEXI2DVI) $(srcdir)/make.texinfo

make.ps: make.dvi
        dvi2ps make.dvi > make.ps

make: $(objs)
        $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
        mv -f make.new make

# -I. is needed to find config.h in the build directory.
.c.o:
        $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
              $(CFLAGS) $< $(OUTPUT_OPTION)

# For some losing Unix makes.
SHELL = /bin/sh


glob/libglob.a: FORCE config.h
        cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \
                         CPPFLAGS='$(CPPFLAGS) -DHAVE_CONFIG_H' \
                         RANLIB='$(RANLIB)' \
                         libglob.a
FORCE:

tagsrcs = $(srcs) $(srcdir)/remote-*.c
TAGS: $(tagsrcs)
        $(ETAGS) $(tagsrcs)
tags: $(tagsrcs)
        $(CTAGS) $(tagsrcs)

.PHONY: install installdirs
install: installdirs \
         $(bindir)/$(binprefix)make $(infodir)/make.info \
         $(mandir)/$(manprefix)make.$(manext)

installdirs:
        $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)

$(bindir)/$(binprefix)make: make
        $(INSTALL_PROGRAM) make $@.new
        @if $(install_setgid); then \
           if chgrp $(group) $@.new && chmod g+s $@.new; then \
             echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
           else \
             echo "$@ needs to be owned by group $(group) and setgid;"; \
             echo "otherwise the \`-l' option will probably not work."; \
             echo "You may need special priveleges to install $@."; \
           fi; \
         else true; fi
# Some systems can't deal with renaming onto a running binary.
        -rm -f $@.old
        -mv $@ $@.old
        mv $@.new $@

$(infodir)/make.info: make.info
        if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
        for file in $${dir}/make.info*; do \
          name="`basename $$file`"; \
          $(INSTALL_DATA) $$file \
            `echo $@ | sed "s,make.info\$$,$$name,"`; \
        done
# Run install-info only if it exists.
# Use `if' instead of just prepending `-' to the
# line so we notice real errors from install-info.
# We use `$(SHELL) -c' because some shells do not
# fail gracefully when there is an unknown command.
        if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
          install-info --infodir=$(infodir) $$dir/make.info; \
        else true; fi

$(mandir)/$(manprefix)make.$(manext): make.man
        $(INSTALL_DATA) $(srcdir)/make.man $@


loadavg: loadavg.c config.h
        $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
              loadavg.c $(LOADLIBES) -o $@
# We copy getloadavg.c into a different file rather than compiling it
# directly because some compilers clobber getloadavg.o in the process.
loadavg.c: getloadavg.c
        ln $(srcdir)/getloadavg.c loadavg.c || \
        cp $(srcdir)/getloadavg.c loadavg.c
check-loadavg: loadavg
        @echo The system uptime program believes the load average to be:
        -uptime
        @echo The GNU load average checking code believes:
        ./loadavg
check: check-loadavg


.PHONY: clean realclean distclean mostlyclean
clean: glob-clean
        -rm -f make loadavg *.o core make.info* make.dvi
distclean: clean glob-realclean
        -rm -f Makefile config.h config.status build.sh stamp-config
        -rm -f TAGS tags
        -rm -f make.?? make.??s make.log make.toc make.*aux
        -rm -f loadavg.c
realclean: distclean
mostlyclean: clean

.PHONY: glob-clean glob-realclean
glob-clean glob-realclean:
        cd glob; $(MAKE) $@

Makefile: config.status $(srcdir)/Makefile.in
        $(SHELL) config.status
glob/Makefile: config.status $(srcdir)/glob/Makefile.in
        $(SHELL) config.status
config.h: stamp-config ;
stamp-config: config.status $(srcdir)/config.h.in
        $(SHELL) config.status
        touch stamp-config

# These rules cause too much trouble.
#configure: configure.in
#        autoconf $(ACFLAGS)
#config.h.in: configure.in
#        autoheader $(ACFLAGS)

# This tells versions [3.59,3.63) of GNU make not to export all variables.
.NOEXPORT:

# The automatically generated dependencies below may omit config.h
# because it is included with ``#include <config.h>'' rather than
# ``#include "config.h"''.  So we add the explicit dependency to make sure.
$(objs): config.h

# Automatically generated dependencies will be put at the end of the file.

# Automatically generated dependencies.
commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h
job.o : job.c make.h commands.h job.h file.h variable.h
dir.o : dir.c make.h config.h
file.o : file.c make.h commands.h dep.h file.h variable.h
misc.o : misc.c make.h dep.h
main.o : main.c make.h commands.h dep.h file.h variable.h job.h getopt.h
read.o : read.c make.h commands.h dep.h file.h variable.h glob/glob.h
remake.o : remake.c make.h commands.h job.h dep.h file.h
rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h
implicit.o : implicit.c make.h rule.h dep.h file.h
default.o : default.c make.h rule.h dep.h file.h commands.h variable.h
variable.o : variable.c make.h commands.h variable.h dep.h file.h
expand.o : expand.c make.h config.h commands.h file.h variable.h
function.o : function.c make.h variable.h dep.h commands.h job.h
vpath.o : vpath.c make.h file.h variable.h
version.o : version.c
ar.o : ar.c make.h file.h dep.h
arscan.o : arscan.c make.h
signame.o : signame.c config.h signame.h
remote-stub.o : remote-stub.c make.h commands.h
getopt.o : getopt.c config.h getopt.h
getopt1.o : getopt1.c config.h getopt.h
getloadavg.o : getloadavg.c config.h

大家快帮忙看看吧,我都快愁死了。

论坛徽章:
0
发表于 2006-04-24 14:49 |显示全部楼层
怎么没人回我了呀,有会的帮我看看吧,求大家了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP