./xsum: В доступе отказано. make: *** [xsum.out] Ошибка 126

1870
user2721585

Я пытаюсь вызвать компилятор f2c / f77 на Mac OSX, используя инструкции, приведенные http://www.webmo.net/support/fortran_osx.html, и получаю следующую ошибку:

./xsum: Permission denied  make: *** [xsum.out] Error 126 

помогите пожалуйста, так как при установке он пропускает создание: / usr / local / bin / f2c

install_f2c_osx.csh содержит:

#! /bin/csh 

#! /bin/csh setenv INSTALL /usr/local curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar" tar -xvf f2c.tar gunzip -rf f2c/* cd f2c mkdir libf2c mv libf2c.zip libf2c cd libf2c unzip libf2c.zip cp makefile.u Makefile make cp f2c.h $INSTALL/include cp libf2c.a $INSTALL/lib cd ../src cp makefile.u Makefile make cp f2c $INSTALL/bin cd .. mkdir -p $INSTALL/share/man/man1 cp f2c.1t $INSTALL/share/man/man1 cp fc $INSTALL/bin/f77 chmod +x $INSTALL/bin/f77 cd .. rm -rf f2c echo "==================SUMMARY==================" echo $0 " has built and installed:" find $INSTALL -name '*f2c*' -mmin -5 find $INSTALL -name '*f77*' -mmin -5

0
Какую команду вы запускаете, которая производит этот вывод? a CVn 9 лет назад 0
после скачивания файла .csh с сайта: user2721585 9 лет назад 0
'code' $ chmod + x install_f2c_osx.csh $ sudo ./install_f2c_osx.csh user2721585 9 лет назад 0
@ MichaelKjörling user2721585 9 лет назад 0

2 ответа на вопрос

1
Steele Griffiths

I've just come across this issue myself (on CentOS 6.5), but managed to fix it by adding a 'chmod' in the installation script at line 6. See the revised scripts below. I've included fixed version of both the Linux and MacOSX installation scripts below (there are minor differences).

I realise it's probably far too late to help the original poster, but it may help others who get stuck. A lot of forums have people with this same issue but none have a solution.

The disappointing thing is that the 'xsum' command is just verifying the files as far as I can see - so it's a broken test step that makes the installation fail - ironic.

If you subsequently encounter ELF errors referring to missing .so files then you are probably missing the 32bit 'glibc' libraries and need to install ones that exactly match your 64bit 'glibc' (or install/update both at the same time) - that was the next issue I had to overcome.

For Linux installs:

#! /bin/csh setenv INSTALL /usr/local curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar" tar -xvf f2c.tar gunzip -rf f2c/* chmod a+x f2c/src/xsum # ADDED chmod for 'xsum' execution permissions. cd f2c mkdir libf2c mv libf2c.zip libf2c cd libf2c unzip libf2c.zip cp makefile.u Makefile make cp f2c.h $INSTALL/include cp libf2c.a $INSTALL/lib cd ../src cp makefile.u Makefile make cp f2c $INSTALL/bin cd .. mkdir -p $INSTALL/share/man/man1 cp f2c.1t $INSTALL/share/man/man1 cp fc $INSTALL/bin/f77 chmod +x $INSTALL/bin/f77 cd .. rm -rf f2c echo "==================SUMMARY==================" echo $0 " has built and installed:" find $INSTALL -name '*f2c*' -mmin -5 find $INSTALL -name '*f77*' -mmin -5 

For MacOSX installs:

#! /bin/csh setenv INSTALL /usr/local curl "http://netlib.sandia.gov/cgi-bin/netlib/netlibfiles.tar?filename=netlib/f2c" -o "f2c.tar" tar -xvf f2c.tar gunzip -rf f2c/* chmod a+x f2c/src/xsum # ADDED chmod for 'xsum' execution permissions. cd f2c mkdir libf2c mv libf2c.zip libf2c cd libf2c unzip libf2c.zip cp makefile.u Makefile make cp f2c.h $INSTALL/include cp libf2c.a $INSTALL/lib cd ../src cp makefile.u Makefile make cp f2c $INSTALL/bin cd .. mkdir -p $INSTALL/share/man/man1 cp f2c.1t $INSTALL/share/man/man1 cp fc $INSTALL/bin/f77 chmod +x $INSTALL/bin/f77 cd .. rm -rf f2c echo "==================SUMMARY==================" echo $0 " has built and installed:" find $INSTALL -name '*f2c*' -mmin -5 find $INSTALL -name '*f77*' -mmin -5 
0
Lucas

для всех, у кого есть проблемы с этим, вы можете также проверить, что двоичный файл xsum может использоваться вашей системой. Перейдите в каталог f2c / src /, затем:

user@computer$ file xsum и сравнить с выводом, скажем, user@computer$ file /bin/sh

Они должны быть одинаковыми. Если нет, удалите двоичный файл xsum, поставляемый с f2c, и соберите свой собственный, используя исходный код xsum.c. То есть, отредактируйте скрипт Гриффитса соответствующей части так:

<------snip--------> cd ../src cp makefile.u Makefile rm xsum cc -O xsum.c -o xsum chmod +x xsum make cp f2c $INSTALL/bin <------snip----->