触摸:无法触摸'LICENSE_43R1_ACCEPTED':权限被拒绝

时间:2016-09-02 13:49:22

标签: makefile

我在Ubuntu 16.04上安装SEISMIC UNIX时遇到问题。我已按照教程说明进行操作

make install

By answering you agree to abide by the terms and conditions of
the above LEGAL STATEMENT ?[y/n]y
touch: cannot touch 'LICENSE_43R1_ACCEPTED': Permission denied
Makefile:66: recipe for target 'LICENSE_43R1_ACCEPTED' failed
make: *** [LICENSE_43R1_ACCEPTED] Error 1

我的makefile

#
# Makefile for the CWP/SU free software distribution
#
# Please read Makefile.config and make the necessary changes there
# then type:      make install    to install the standard CWP/SU codes
#                 make xtinstall  to install X-toolkit codes
#                 make finstall   to install Fortran codes
#                 make mglinstall to install Mesa/Open GL codes
#                 make xminstall  to install X-Motif codes (optional)
#         make sfinstall  to install SFIO materials and SEGDREAD
#
# or if remaking:
# type:           make remake     to remake the standard CWP/SU codes
#                 make xtremake   to remake X-toolkit codes
#                 make fremake    to remake Fortran codes
#                 make mglremake  to remake Mesa/Open GL codes
#                 make xmremake   to remake X-Motif codes
#         make sfremake   to install SFIO materials and SEGDREAD
#
# Note: SEGDREAD is the program for reading SEG-D format tapes 
#
# Additional items are included in: cwputils 
# to compile:
#       make utils      
#
# Do not try to install all of the codes at one time via:
# % make install ; make xtinstall ; make xminstall
# If you get an error message about not finding /src/Makefile.config
# the explicitly define your CWPROOT path on the next line
#CWPROOT =

include $(CWPROOT)/src/Makefile.config


donothing: # To protect against an idle "make" to "see what happens"
    @echo ""
    @echo "This is a dangerous makefile--so the default is do_nothing"
    @echo "Please read and edit Makefile.config appropriately"
    @echo "then type: make install   (to install the basic set of codes)"
    @echo "           make xtinstall (to install the X-toolkit applications)"
    @echo "           make finstall  (to install the Fortran codes)"
    @echo "           make mglinstall (to install the Mesa/ Open GL items)"
    @echo "           make utils     (to install libcwputils) (nonessential) "
    @echo "           make xminstall (to install the Motif application)"
    @echo "           make sfinstall (to install the SFIO version of SEGDREAD)"
    @echo ""
    @echo "or if remaking:"
    @echo "type:      make remake   (to remake the basic set of codes)"
    @echo "           make xtremake (to remake the X-toolkit applications)"
    @echo "           make fremake  (to install the Fortran codes)"
    @echo "           make mglremake (to install the Mesa/ Open GL items)"
    @echo "           make uremake  (to remake libcwputils.a)(nonessential)"
    @echo "           make xmremake (to remake the Motif-based applications)"
    @echo "           make sfinstall (to remake the SFIO version of SEGDREAD)"
    @echo " "
    @echo "See the README_ files in ./Portability for more information."

install: checkroot LICENSE_43R1_ACCEPTED MAILHOME_43 makedirs cwpstuff plot sustuff tristuff tetrastuff compstuff reflstuff

xtinstall: xtcwp_
xminstall: xmcwp_
mglinstall: mglstuff

# automatic mail message (ask once)
LICENSE_43R1_ACCEPTED   :
    @./license.sh
    @touch $@

# automatic mail message (ask once)
MAILHOME_43 :
    @./mailhome.sh
    @touch $@

# check to see if the CWPROOT path is set
checkroot   :
    @./chkroot.sh
    @echo $(CWPROOT)

# Make the bin/include/lib directories if not already there
makedirs: 
    @echo "Making necessary directories"
    @./mkdirectories.sh

cwpstuff:
    cd ./cwp; $(MAKE)
    cd ./par; $(MAKE)

plot    :
    cd ./psplot; $(MAKE)

sustuff :
    cd ./su ; $(MAKE)

xtcwp_  :
    cd ./Xtcwp; $(MAKE)
    cd ./xplot; $(MAKE)
    cd ./xtri; $(MAKE)

xmcwp_  :
    cd ./Xmcwp; $(MAKE)

complex :
    cd ./Complex; $(MAKE)

utils   :
    cd ./cwputils; $(MAKE)

tristuff:
    cd ./tri; $(MAKE)
    cd ./Trielas; $(MAKE)

tetrastuff:
    cd ./tetra; $(MAKE)

compstuff:
    cd ./comp; $(MAKE)


reflstuff:
    cd ./Refl ; $(MAKE)

mglstuff:
    cd ./Mesa; $(MAKE)

finstall:
    cd ./Fortran; $(MAKE)

sfinstall:
    cd ./Sfio; $(MAKE)

remake  :
    @./chkroot.sh
    cd ./cwp; $(MAKE) remake
    cd ./par; $(MAKE) remake
    cd ./psplot; $(MAKE) remake
    cd ./su/include; $(MAKE) remake
    cd ./su; $(MAKE) remake
    cd ./tri; $(MAKE) remake
    cd ./tetra; $(MAKE) remake
    cd ./comp; $(MAKE) remake
    cd ./Refl; $(MAKE) remake

xtremake    :
    cd ./Xtcwp; $(MAKE) remake
    cd ./xplot; $(MAKE) remake
    cd ./xtri; $(MAKE) remake

xmremake    :
    cd ./Xmcwp; $(MAKE) remake

mglremake:
    cd ./Mesa; $(MAKE) remake

uremake:
    cd ./cwputils; $(MAKE) remake

tremake:
    cd ./tri; $(MAKE) remake

compmake:
    cd ./comp; $(MAKE) remake

fremake:
    cd ./Fortran; $(MAKE) remake

sfremake:
    cd ./Sfio; $(MAKE) remake

如果我尝试作为根

root@milenko-HP-Compaq-6830s:/opt/cwp/43R1/src# make install
Makefile:32: /src/Makefile.config: No such file or directory
make: *** No rule to make target '/src/Makefile.config'.  Stop.

如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

您没有该文件的必要权限。最有可能您的安装需要root权限。尝试

sudo make install

答案 1 :(得分:0)

导致错误是因为您登录的用户没有相应的权限来执行此操作,因此请使用sudo或su

执行此操作
sudo make install

或者您可以先以root用户身份切换,然后触发命令:

su
make install