gpt4 book ai didi

xcode - 在 Mac OSX 10.6.8 上安装 f2c

转载 作者:行者123 更新时间:2023-12-02 00:27:24 24 4
gpt4 key购买 nike

我使用了来自 http://hpc.sourceforge.net/buildf2c 的 f2c 版本和 http://hamishrickerby.com/2009/02/20/installing-f2c-on-a-mac/#disqus_thread , 但它们都不起作用。

我按照安装说明进行操作。一切顺利,直到第 4 步:


4。创建并安装f2c头文件f2c.h ...

make: `f2c.h' is up to date.
mkdir: /usr/local/include: File exists
cp: /usr/local/include is not a directory

...完成。

5。创建和安装 f2c 库 libf2c.a ...

cp signal1.h0 signal1.h
cp sysdep1.h0 sysdep1.h
/usr/bin/cc -c f77vers.c
cc1: error: /usr/local/include: not a directory
make: *** [f77vers.o] Error 1
cp: libf2c.a: No such file or directory
ranlib: can't open file: /usr/local/lib/libf2c.a (Permission denied)

...完成。

6。创建和安装 f2c 转换器 ...

/usr/bin/cc -O -o xsum xsum.c
cc1: error: /usr/local/include: not a directory
make: *** [xsum] Error 1
cp: f2c: No such file or directory
ln: /bin/f2c: Permission denied

...完成。

7.正在安装 fc 脚本 ...

cp: /usr/local/bin/fc: Permission denied
ln: /bin/fc: Permission denied
ln: /bin/f77: Permission denied

...完成。

8。安装手册页 ...

cp: /usr/share/man/man1/f2c.1: Permission denied

...完成。

9。正在清理......

rm -f *.o f2c sysdep.hd tokdefs.h f2c.t
rm -f libf2c.a *.o arith.h signal1.h sysdep1.h

...全部完成!

结果当然是: -bash: f2c: 找不到命令

我在下次尝试之前修复了磁盘权限,但这没有效果。我不明白出了什么问题。我之前安装了 Xcode 4 和 Intel fortran。后者效果很好。

我的问题似乎与另一个线程中描述的问题相似 Newbie question f2c compilation problem: cc1plus error: /include: not a directory What does this mean?正如在提到的线程中,我得到

--with-gxx-include-dir=/include/c++/4.2.1

但我不知道如何解决这个问题。会不会是Xcode和f2c不兼容?

感谢您的帮助:-)

最佳答案

Permission denied 并不意味着安装成功...

这实际上意味着您的用户无法在特定位置安装。

安装时,使用 sudo,这样您将以管理员权限进行安装。

通常:

./configure
make
sudo make install

注意 make install 之前的 sudo

关于xcode - 在 Mac OSX 10.6.8 上安装 f2c,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8352393/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com