分页: 1 / 1
gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-30 22:59
由 univeeeye00
Hi, 大家好,我是初次使用Linux系统(Ubuntu13.04),现在运行使用gfortran编译得到的可执行文件出现问题,求教。
问题描述:Fortran文件test.f90, 代码如下:
$ gfortran test.f90 -o test
$ sudo ./test
sudo ./test: command not found
编译没有error及warning出现,故fortran代码应该没有问题,采用其他代码执行同样操作也遇到相同问题。
执行第2条命令后,系统提示command not found。
使用 $ sudo chmod +x test 也无济于事。
后尝试
$ test
则没有任何反应。
此问题baidu及google均未找到解决方案,特在此求教,望大侠们不吝赐教。thanks for you attention.
PS: test.f90 Code:
program test
write(*,*)'Hello"
end
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-30 23:05
由 月下叹逍遥
./text
不加sudo
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 0:04
由 zhw2101024
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 9:27
由 univeeeye00
月下叹逍遥 写了:./text
不加sudo
你好,不加sudo,输入 $ ./test
显示persmission dennied~
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 9:31
由 univeeeye00
你好,输入如下代码后,问题仍然未解决:
$ chmod +x test
$ test
(输入后没有任何反应 —— 没有代码中的屏幕输出显示)
$ ./test
bash: ./test: Permission denied
$ sudo ./test
sudo: ./test: command not found
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 14:24
由 月下叹逍遥
这不科学。。。
尝试一下——
代码: 全选
gfortran test.f90 -o test && ./test
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 16:30
由 YeLee
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-08-31 17:10
由 univeeeye00
月下叹逍遥 写了:这不科学,尝试一下
代码: 全选
gfortran test.f90 - o test && ./test
按此方式仍然不能解决问题,问题与用
一样。
YeLee 写了:
另,确定一下分区是否支持posix权限。
这个命令不知道什么意思~~,执行完后显示
代码: 全选
mode of './test' changed from 0600 (rw------) to 0711 (rwx--x--x)
不过受此提示。我想到原来的操作是在NTFS 分区下进行,将文件夹拷贝至
后,DONE
这个问题折腾了3day,算是交里学费了。。。
非常感谢各位的回复与帮助~~
Re: gfortran编译的可执行文件无法运行,显示command not found.
发表于 : 2013-09-02 8:44
由 zhw2101024
univeeeye00 写了:月下叹逍遥 写了:这不科学,尝试一下
代码: 全选
gfortran test.f90 - o test && ./test
按此方式仍然不能解决问题,问题与用
一样。
YeLee 写了:
另,确定一下分区是否支持posix权限。
这个命令不知道什么意思~~,执行完后显示
代码: 全选
mode of './test' changed from 0600 (rw------) to 0711 (rwx--x--x)
不过受此提示。我想到原来的操作是在NTFS 分区下进行,将文件夹拷贝至
后,DONE
这个问题折腾了3day,算是交里学费了。。。
非常感谢各位的回复与帮助~~
我是折腾了个把月
