Discussion:
"command not found"-For All Commands
physicist25
2010-05-30 16:01:01 UTC
Permalink
Hello, I have recently downloaded cygwin with the hope of learning c++ for
school.....the download completed with no problems at all. I installed some
packages such as gcc4, util-linux, ncurses devel, pcre devel, openssl devel,
zlib devel, mintty etc.

Some Info:
-My machine is a Toshiba L505 Satellit running Windows 7 Ultimate.
-My programming experiance is limited to MATLAB

Now my problem is that I get the response "command not found" for any
commands other than echo on/off. I googled my heart away and found some
articles that I think are related, as a result I added a path to cygwins bin
by going through control panel. I didnt seem to work.

Some issues I found in common with others on the web is that typing
-sh-3.2# ls
-sh: ls: command not found
-sh-3.2#
Refering to a discussion on ls responding with "command not found"
(http://cygwin.com/ml/cygwin/2002-10/msg00136.html) I looked in my bin to
see if ls is there...it is! I looked in my bin to see if fileutls is
there...its NOT and I couldnt find it on the packages list. Looking at the
packages list I found that fileutls is located in the package coreutils and
when I went to update cygwin it gives me the option of keeping this
package...which means I have it, so what am I doing wrong.

Some other thoughts, typing ls...like I stated earlier yields the response
command not found... but ls/ lists the files I see in bin.....so does
/usr/bin/ls.
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28722920.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Andy Koppe
2010-05-30 16:54:10 UTC
Permalink
Post by physicist25
Hello, I have recently downloaded cygwin with the hope of learning c++ for
school.....the download completed with no problems at all. I installed some
packages such as gcc4, util-linux, ncurses devel, pcre devel, openssl devel,
zlib devel, mintty etc.
-My machine is a Toshiba L505 Satellit running Windows 7 Ultimate.
-My programming experiance is limited to MATLAB
Now my problem is that I get the response "command not found" for any
commands other than echo on/off. I googled my heart away and found some
articles that I think are related, as a result I added a path to cygwins bin
by going through control panel. I didnt seem to work.
Some issues I found in common with others on the web is that typing
-sh-3.2# ls
-sh: ls: command not found
-sh-3.2#
How are you invoking your Cygwin session?

Andy
physicist25
2010-05-30 17:48:56 UTC
Permalink
I am initiating two ways, 1- using the desktop icon I created and 2-using the
one at start that says mintty.
Their startups screens are "bash-3.2#" and "-sh-3.2$". Does this answer your
question?
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28723613.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Andy Koppe
2010-05-30 19:26:38 UTC
Permalink
Post by physicist25
I am initiating two ways, 1- using the desktop icon I created and 2-using the
one at start that says mintty.
Their startups screens are "bash-3.2#" and "-sh-3.2$". Does this answer your
question?
The result in case 1 is to be expected unless your desktop shortcut
contains a '-' argument to tell mintty to invoke bash as a login
shell. If bash isn't invoked as a login shell, /etc/profile isn't
sourced and the prompt and path (among other things) aren't set up.

The default mintty shortcut in the start menu does contain that '-'
argument though, which is confirmed by the '-' at the start of the
prompt you get. I can only reproduce that by removing /etc/profile
though, so it looks like something's gone quite wrong with your
install.

At this point we'll probably need the cygcheck output as described at
http://cygwin.com/problems.html, or you might just want to try
reinstalling.

Andy
physicist25
2010-05-30 19:55:28 UTC
Permalink
I ran cygcheck, its also attached as a .txt file. Notice how I had to add a
"/" to the command to run it.

-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#

http://old.nabble.com/file/p28724417/nocommandswork.txt nocommandswork.txt
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28724417.html
Sent from the Cygwin list mailing list archive at Nabble.com.
physicist25
2010-05-30 18:18:55 UTC
Permalink
I just realized what you ment. Okay, this is how I tried to run a cpp file.

-sh-3.2# ls c:/cygwin/home
-sh: ls: command not found
-sh-3.2# ls/ c:/cygwin/home
cygwin warning:
MS-DOS style path detected: c:/cygwin/home
Preferred POSIX equivalent is: /home
CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
hello.cpp
-sh-3.2# ls/ /home
hello.cpp
-sh-3.2# g++ hello.cpp -o hello
-sh: g++: command not found
-sh-3.2# g++/ hello.cpp -o hello
: hello.cpp: No such file or directory
: no input files
-sh-3.2# ./hello
-sh: ./hello: No such file or directory
-sh-3.2#

I have no idea what is going on!!!
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28723813.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Gregg Levine
2010-05-30 18:25:28 UTC
Permalink
Post by physicist25
I just realized what you ment. Okay, this is how I tried to run a cpp file.
-sh-3.2# ls c:/cygwin/home
-sh: ls: command not found
-sh-3.2# ls/ c:/cygwin/home
 MS-DOS style path detected: c:/cygwin/home
 Preferred POSIX equivalent is: /home
 CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
   http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
hello.cpp
-sh-3.2# ls/ /home
hello.cpp
-sh-3.2# g++ hello.cpp -o hello
-sh: g++: command not found
-sh-3.2# g++/ hello.cpp -o hello
: hello.cpp: No such file or directory
: no input files
-sh-3.2# ./hello
-sh: ./hello: No such file or directory
-sh-3.2#
I have no idea what is going on!!!
Hello!
Friend what version (so to speak) of Cygwin are you running? How did
you install it? For myself, and I suspect that it may not be
appropriate for all, I typically run the actual setup program from the
website and follow its urging to download itself to a folder, and then
install it. Wait for that to happen and finally check to see if the
simple program ls for list files works, and then repeat setup, but do
so off-line working from the folder. Then repeat to see if the build
utilities like Gcc and friends have arrived.

That prompt resembles something from the Beta series of Cygwin or
perhaps from one of the terminals that doesn't recognize how BASH
constructs a (normal) prompt.

-----
Gregg C Levine ***@gmail.com
"This signature fought the Time Wars, time and again."
physicist25
2010-05-30 19:39:02 UTC
Permalink
I am running the version I downloaded a couple days ago from the cygwin
website. After installation my Windows7 program compatibility application
told me that cygwin was not installed correctly, after which I told it to
reinstall...and it did but this time the installation was much faster.




Hello!
Friend what version (so to speak) of Cygwin are you running? How did
you install it? For myself, and I suspect that it may not be
appropriate for all, I typically run the actual setup program from the
website and follow its urging to download itself to a folder, and then
install it. Wait for that to happen and finally check to see if the
simple program ls for list files works, and then repeat setup, but do
so off-line working from the folder. Then repeat to see if the build
utilities like Gcc and friends have arrived.

That prompt resembles something from the Beta series of Cygwin or
perhaps from one of the terminals that doesn't recognize how BASH
constructs a (normal) prompt.

-----
Gregg C Levine ***@gmail.com
"This signature fought the Time Wars, time and again."

--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28724299.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Christopher Faylor
2010-05-30 20:59:55 UTC
Permalink
Post by physicist25
I am running the version I downloaded a couple days ago from the cygwin
website. After installation my Windows7 program compatibility
application told me that cygwin was not installed correctly, after
which I told it to reinstall...and it did but this time the
installation was much faster.
I may have missed it but it seems like we're several messages into this
discussion and you have not yet sent either cygcheck output (as
described in http://cygwin.com/problems.html) or, at a bare minimum, the
value of your PATH environment variable.

cgf
physicist25
2010-05-30 22:36:59 UTC
Permalink
I did send the results of cygcheck...some slight changes since...

"I ran cygcheck, its also attached as a .txt file. Notice how I had to add a
"/" to the command to run it."

-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#


I did this again, same results except now I dont have to use "/" when i
write "cygcheck", the results of running the command are the same.

http://old.nabble.com/file/p28725344/nocommandswork.txt nocommandswork.txt
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28725344.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Greg Chicares
2010-05-30 23:00:43 UTC
Permalink
Post by physicist25
-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#
Run it in a windows "command prompt" instead of in bash:
cd \cygwin\bin
cygcheck -s -v -r > cygcheck.out
There should be hundreds of lines of output in 'cygcheck.out'.
physicist25
2010-05-30 23:24:33 UTC
Permalink
I received exactly the same response!
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28725551.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Greg Chicares
2010-05-30 23:33:58 UTC
Permalink
Post by physicist25
I received exactly the same response!
The context was that running
cygcheck -s -v -r > cygcheck.out
displayed an error on the screen. But see whether a file named
'cygcheck.out' was created. It should contain the output that
cygcheck was able to produce.
Christopher Faylor
2010-05-30 23:08:48 UTC
Permalink
Post by physicist25
I did send the results of cygcheck...some slight changes since...
"I ran cygcheck, its also attached as a .txt file. Notice how I had to add a
"/" to the command to run it."
-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#
I did this again, same results except now I dont have to use "/" when i
write "cygcheck", the results of running the command are the same.
http://old.nabble.com/file/p28725344/nocommandswork.txt nocommandswork.txt
This is what that oddly attached file shows:

-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#

That shows you typing the commands but it doesn't show that actual output
from the commands.

cgf
physicist25
2010-05-30 23:31:01 UTC
Permalink
"cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112 "
Is the response im getting.
And the next line is the command prompt "-sh-3.2# ".
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28725578.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Christopher Faylor
2010-05-30 23:40:48 UTC
Permalink
Post by physicist25
"cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112 "
Is the response im getting.
And the next line is the command prompt "-sh-3.2# ".
Wow. Here's a new one.

The instructions at http://cygwin.com/problems.html say:

* Run cygcheck -s -v -r > cygcheck.out and include that file as an
attachment in your report. Please do not compress or otherwise encode
the output. Just attach it as a straight text file so that it can be
easily viewed.

The "that file" mentioned in this context is "cygcheck.out". It isn't a
screen dump of the comands that you ran.

So, to be really clear: We don't care what you typed. The output of
what you typed has gone into the file "cygcheck.out". That's what we're
interested in.

cgf
physicist25
2010-05-31 14:15:48 UTC
Permalink
Here is cygcheck.out
http://old.nabble.com/file/p28731448/cygcheck.out cygcheck.out
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28731448.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Marco Atzeri
2010-05-31 15:36:50 UTC
Permalink
Post by physicist25
Here is cygcheck.out
http://old.nabble.com/file/p28731448/cygcheck.out
cygcheck.out
--
2 obvious problem

1) Warning: There are multiple cygwin1.dlls on your path

2) on your path, cygwin is at the end

Path: C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Cygwin\bin
C:\Cygwin\usr\sbin
C:\Cygwin\home

so something like this happen :

Found: C:\Windows\system32\find.exe
Found: C:\Cygwin\bin\find.exe
Warning: C:\Windows\system32\find.exe hides C:\Cygwin\bin\find.exe


are you redefining the PATH in your shell script ?

Marco
Christopher Faylor
2010-05-31 16:57:14 UTC
Permalink
Post by Marco Atzeri
Post by physicist25
Here is cygcheck.out
http://old.nabble.com/file/p28731448/cygcheck.out
cygcheck.out
--
2 obvious problem
1) Warning: There are multiple cygwin1.dlls on your path
True, but they all seem to be the same cygwin dll. So, while not optimal, this
should not be a problem.

I don't quite understand how cygcheck found c:\Cygwin\bin\cygwin1.dll
and c:\cygwin\bin\cygwin1.dll though.
Post by Marco Atzeri
2) on your path, cygwin is at the end
Path: C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Cygwin\bin
C:\Cygwin\usr\sbin
C:\Cygwin\home
Found: C:\Windows\system32\find.exe
Found: C:\Cygwin\bin\find.exe
Warning: C:\Windows\system32\find.exe hides C:\Cygwin\bin\find.exe
are you redefining the PATH in your shell script ?
Yes, this is a good question.

cgf
physicist25
2010-05-31 20:02:02 UTC
Permalink
I am not redfining the path in the shell script.
Can the problem of cygwin being at the end of my path be fixed by putting it
first on the "Path" variable in windows system properties?
--
View this message in context: http://old.nabble.com/%22command-not-found%22-For-All-Commands-tp28722920p28734625.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Dave Korn
2010-05-31 01:41:43 UTC
Permalink
Post by physicist25
Post by physicist25
"I ran cygcheck, its also attached as a .txt file. Notice how I had to add a
"/" to the command to run it."
I did this again, same results except now I dont have to use "/" when i
write "cygcheck", the results of running the command are the same.
http://old.nabble.com/file/p28725344/nocommandswork.txt nocommandswork.txt
-sh-3.2# cygcheck -s -v -r > cygcheck.out
-sh: cygcheck: command not found
-sh-3.2# cygcheck/ -s -v -r > cygcheck.out
cygcheck: dump_sysinfo: GetVolumeInformation() for drive D: failed: 112
-sh-3.2#
This is just the bizarrest thing I've ever seen. What on earth is going on
here that appending a slash could make the difference? Is there any kind of
alternative unix-alike system such as msys, mingw, mks or gnuwin installed on
the machine?

cheers,
DaveK
neal somos
2010-06-01 16:12:04 UTC
Permalink
Original poster had written ...
Post by physicist25
After installation my Windows7 program compatibility application
told me that cygwin was not installed correctly, after which I told it to
reinstall...and it did but this time the installation was much faster.
I am very suspicious of anything that Windows 7 might suggest with
respect to Cygwin.
On what basis does Win 7 claim that Cygwin was not installed correctly,
and how on earth can Win 7 hope to correct this for you?

I would suggest un-installing Cygwin, then from Cygwin setup
once again installing Cygwin, and then strenuously avoiding
any suggestions from Win 7 that it knows better than Cygwin
about Cygwins own installation.
DePriest, Jason R.
2010-06-01 16:52:28 UTC
Permalink
Post by neal somos
I am very suspicious of anything that Windows 7 might suggest with
respect to Cygwin.
On what basis does Win 7 claim that Cygwin was not installed correctly,
and how on earth can Win 7 hope to correct this for you?
I would suggest un-installing Cygwin, then from Cygwin setup
once again installing Cygwin, and then strenuously avoiding
any suggestions from Win 7 that it knows better than Cygwin
about Cygwins own installation.
--
I think one of the reasons that Windows 7 is detecting a problem is
because he ran a program called 'setup.exe' but it didn't create an
entry in Add/Remove Programs.

Just ignore it.

Maybe there is something that could be added to the .manifest that
would make the message never appear? I do not know.

-Jason

Loading...