gfortran编译的可执行文件无法运行,显示command not found.

其它类软件,非上述版软件
回复
univeeeye00
帖子: 5
注册时间: 2013-08-30 22:36
系统: Ubuntu13.04

gfortran编译的可执行文件无法运行,显示command not found.

#1

帖子 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
上次由 univeeeye00 在 2013-08-31 12:30,总共编辑 1 次。
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: gfortran编译的可执行文件无法运行,显示command not found.

#2

帖子 月下叹逍遥 »

./text

不加sudo
浮生七十今三十,从此凄惶未可知
头像
zhw2101024
帖子: 1849
注册时间: 2009-03-28 16:10
系统: Arch debian win7
联系:

Re: gfortran编译的可执行文件无法运行,显示command not found.

#3

帖子 zhw2101024 »

代码: 全选

chmod +x test
univeeeye00
帖子: 5
注册时间: 2013-08-30 22:36
系统: Ubuntu13.04

Re: gfortran编译的可执行文件无法运行,显示command not found.

#4

帖子 univeeeye00 »

月下叹逍遥 写了:./text

不加sudo
你好,不加sudo,输入 $ ./test
显示persmission dennied~
univeeeye00
帖子: 5
注册时间: 2013-08-30 22:36
系统: Ubuntu13.04

Re: gfortran编译的可执行文件无法运行,显示command not found.

#5

帖子 univeeeye00 »

zhw2101024 写了:

代码: 全选

chmod +x test
你好,输入如下代码后,问题仍然未解决:
$ chmod +x test
$ test
(输入后没有任何反应 —— 没有代码中的屏幕输出显示)
$ ./test
bash: ./test: Permission denied
$ sudo ./test
sudo: ./test: command not found
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: gfortran编译的可执行文件无法运行,显示command not found.

#6

帖子 月下叹逍遥 »

这不科学。。。

尝试一下——

代码: 全选

gfortran test.f90 -o test && ./test
浮生七十今三十,从此凄惶未可知
头像
YeLee
论坛版主
帖子: 26406
注册时间: 2008-08-13 8:48
系统: Fundu i64
来自: 东海硇州,一双管钥。
联系:

Re: gfortran编译的可执行文件无法运行,显示command not found.

#7

帖子 YeLee »

代码: 全选

chmod -v +x ./test
另,确定一下分区是否支持posix权限。
◎当我站在道德的高度上俯视别人的时候,发现自己是多么渺小。
♥执着但不偏激,反对而不排斥,坚决捍卫矛盾体的存在方式。
★★★天气预报★★★
fcitx-yatable一个可以使用的码表输入法
[教程]几个实例攻克软件编译难关
Gentoo Development Guide
字体相关
univeeeye00
帖子: 5
注册时间: 2013-08-30 22:36
系统: Ubuntu13.04

Re: gfortran编译的可执行文件无法运行,显示command not found.

#8

帖子 univeeeye00 »

月下叹逍遥 写了:这不科学,尝试一下

代码: 全选

gfortran test.f90 - o test && ./test
按此方式仍然不能解决问题,问题与用

代码: 全选

./test
一样。
YeLee 写了:

代码: 全选

chmod -v +x ./test
另,确定一下分区是否支持posix权限。
这个命令不知道什么意思~~,执行完后显示

代码: 全选

mode of './test' changed from 0600 (rw------) to 0711 (rwx--x--x)
不过受此提示。我想到原来的操作是在NTFS 分区下进行,将文件夹拷贝至

代码: 全选

/home
后,DONE :em11
这个问题折腾了3day,算是交里学费了。。。

非常感谢各位的回复与帮助~~
头像
zhw2101024
帖子: 1849
注册时间: 2009-03-28 16:10
系统: Arch debian win7
联系:

Re: gfortran编译的可执行文件无法运行,显示command not found.

#9

帖子 zhw2101024 »

univeeeye00 写了:
月下叹逍遥 写了:这不科学,尝试一下

代码: 全选

gfortran test.f90 - o test && ./test
按此方式仍然不能解决问题,问题与用

代码: 全选

./test
一样。
YeLee 写了:

代码: 全选

chmod -v +x ./test
另,确定一下分区是否支持posix权限。
这个命令不知道什么意思~~,执行完后显示

代码: 全选

mode of './test' changed from 0600 (rw------) to 0711 (rwx--x--x)
不过受此提示。我想到原来的操作是在NTFS 分区下进行,将文件夹拷贝至

代码: 全选

/home
后,DONE :em11
这个问题折腾了3day,算是交里学费了。。。

非常感谢各位的回复与帮助~~
我是折腾了个把月 :em06
回复