I'm trying to build gcc-7.1.0 locally on Windows via Cygwin (I already have gcc 5.4.0 installed and functioning). I downloaded the tar, ran the configure program in its own directory as prescribed, which yielded:
~/build-gcc
$ ll
total 609
-rw-r--r-- 1 Barry None 31021 Aug 12 09:08 config.log
-rwxr-xr-x 1 Barry None 33630 Aug 12 09:08 config.status
-rw-r--r-- 1 Barry None 551897 Aug 12 09:08 Makefile
-rw-r--r-- 1 Barry None 13 Aug 12 09:08 serdep.tmp
Great, now:
$ make -j4
$
Nothing.
$ make --version
$
Nothing again.
$ which make
/usr/bin/make
$ cygcheck -c make
Cygwin Package Information
Package Version Status
make 4.2.1-2 OK
So it exists at least. And trying to reinstall make via cygwin suggests that everything is up to date. What's going wrong here?
Related
I have go program in my project that shows very strange behavior. It runs Ok from any folder, but not from the one ("unpack") it is unpacked by my other code. I have made "cp -R" of this directory to "unpack2" and renamed "unpack" to "unpack1" for clarity. Here how it looks like:
$ ls -lR
total 0
drwxr-xr-x 3 michael staff 96 23 сен 09:36 unpack1
drwxr-xr-x 3 michael staff 96 23 сен 09:36 unpack2
./unpack1:
total 206760
-rwxr-xr-x 1 michael staff 105859154 23 сен 09:23 install
./unpack2:
total 229504
-rwxr-xr-x 1 michael staff 105859154 23 сен 00:28 install
$ unpack1/install
$ unpack2/install
[1] 34435 killed unpack2/install
$
"unpack1/install" runs with no problems
"unpack1/install" crashes
I have double checked that both "install" are the same binary
P.S.
I use macbook M1
I've been toying with chef, and may have installed ruby along the way. Now I would like to upgrade to ruby 2.0. Anyhow I'm curious what could have caused ruby to be added to the path of all new users? Note: there's no mention of ruby in the new user's .bashrc, .profile, or in the global /etc/environment:
ubuntu#ip-10-10-10-10:~$ sudo useradd -m testuser
ubuntu#ip-10-10-10-10:~$ sudo su - testuser
testuser#ip-10-10-10-10:~$ ls -la
total 20
drwxr-xr-x 2 testuser testuser 4096 Mar 23 02:54 .
drwxr-xr-x 5 root root 4096 Mar 23 02:54 ..
-rw-r--r-- 1 testuser testuser 220 Apr 9 2014 .bash_logout
-rw-r--r-- 1 testuser testuser 3637 Apr 9 2014 .bashrc
-rw-r--r-- 1 testuser testuser 675 Apr 9 2014 .profile
testuser#ip-10-10-10-10:~$ echo $PATH
/home/testuser/.gem/ruby/1.9.3/bin:/opt/rubies/1.9.3-p429/lib/ruby/gems/1.9.1/bin:/opt/rubies/1.9.3-p429/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
testuser#ip-10-10-10-10:~$ ruby --version
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
testuser#ip-10-10-10-10:~$ which ruby
/opt/rubies/1.9.3-p429/bin/ruby
testuser#ip-10-10-10-10:~$
I'm at a loss as to where to look to find and remove the references to ruby 1.9.3 being added apparently automatically.
I faced similar issue. Please try with this option dpkg --get-selections.
As you might be knowing everything is considered as gems. Hence try with this also if above does not work...
$ gem -h
or
$rvm list known
and then you can install only the required version using
rvm install ruby 2.0.0-p247
REFERNCE:- http://www.ruby-lang.org/en/downloads/
Turns out somewhere along the way, somehow, chruby got installed. The quick fix to resolve the user PATH not being overwritten was to disable the .sh chruby put in /etc/profile.d:
ubuntu#ip-10-10-10-10:/etc/profile.d$ ls -l
total 16
-rw-r--r-- 1 root root 663 Aug 19 2015 bash_completion.sh
-rw-r--r-- 1 root root 147 Mar 21 00:58 chruby.sh
-rw-r--r-- 1 root root 1559 Jul 29 2014 Z97-byobu.sh
-rwxr-xr-x 1 root root 2691 Nov 23 18:41 Z99-cloud-locale-test.sh
ubuntu#ip-10-10-10-10:/etc/profile.d$ sudo mv chruby.sh chruby.sh.disabled
ubuntu#ip-10-10-10-10:/etc/profile.d$ ls
bash_completion.sh chruby.sh.disabled Z97-byobu.sh Z99-cloud-locale-test.sh
ubuntu#ip-10-10-10-10:/etc/profile.d$ sudo su - testuser
testuser#ip-10-10-10-10:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Better would be to uninstall chruby, but it's not obvious to me how to do that given I don't know / don't remember how it was installed.
When I look at my files in a cygwin terminal, every file created by Windows or a Windows program has 770 permissions, which means they're executable by user & group. Files created by cygwin all have 674 permissions, which means they're executable by group but not owner (!) and also readable by other, which I don't want. In either case, if I use "ls -F", every file (except directories) is marked with an '*' to show it's executable. (Contrary to any of this, the cygwin documentation claims that files will be marked executable only under certain conditions, for example if the filename ends in ".sh" or ".exe".)
$ ls -lF
total 45
drwxrwx---+ 1 tom None 0 Nov 19 12:42 Debug/
-rwxrwx---+ 1 tom None 8347 Sep 3 14:28 lnk_delta.cmd*
drwxrwx---+ 1 tom None 0 Nov 18 14:25 notes/
-rwxrwx---+ 1 tom None 15565 Nov 19 12:44 main.c*
-rwxrwx---+ 1 tom None 5999 Nov 11 12:04 system_pre_init.c*
drwxrwx---+ 1 tom None 0 Oct 19 15:26 targetConfigs/
-rw-rwxr--+ 1 tom None 1 Nov 19 16:13 thisFileCreatedByCygwin*
Relatedly, when I create a file with cygwin, it's NTFS permissions include a group named NONE that also has read permission. If I create a directory with cygwin, it's NTFS permissions includegroups named NONE, CREATOR OWNER, and CREATOR GROUP.
This seems completely brain-damaged. Does anyone know how to fix it?
Thanks,
Tom
cygwin version: cygwin64
OS: Windows 7 Ultimate 64bit SP1
disk format: NTFS
cygwin login shell: /usr/bin/bash
cygwin terminal: mintty.exe
I simply changed the name in finder and now when I use a command in terminal, this is the error I keep receiving. I've tried to look at all the other cases of the same error but they all pertain to different solutions that don't work. The path is clearly correct because when I try to cd into the directory, I'm already in the directory it is contained in.
Johns-MacBook-Air:SongAnalysisSentiment johnanukem$ cd app
-bash: cd: app: No such file or directory
Johns-MacBook-Air:SongAnalysisSentiment johnanukem$ ls
README app sentiments.csv songdictionary.py
Johns-MacBook-Air:SongAnalysisSentiment johnanukem$ ls -lah
total 776
drwxr-xr-x 8 johnanukem staff 272B Nov 14 02:38 .
drwx------+ 39 johnanukem staff 1.3K Nov 14 02:38 ..
-rw-r--r--# 1 johnanukem staff 6.0K Nov 14 01:39 .DS_Store
drwxr-xr-x 16 johnanukem staff 544B Nov 14 02:43 .git
-rw-r--r-- 1 johnanukem staff 35B Nov 14 01:38 README
drwxr-xr-x 8 johnanukem staff 272B Nov 14 02:38 app
-rw-r--r-- 1 johnanukem staff 370K Nov 14 01:49 sentiments.csv
-rw-r--r-- 1 johnanukem staff 1.3K Nov 14 02:29 songdictionary.py
type cd ap and then [Press Tab] to autocomplete, may be there is some spaces after app
On MacOS with the default Bash
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.
cd app raises the error
-bash: cd: app: No such file or directory
due to a bug of the super old Bash version installed with MacOS.
The workaround is to prefix the directory with ./ in this way
cd ./app
and it will work.
The alternative is to install a modern and better Bash version using Homebrew.
brew install bash
On a rMBP here. I'm not sure what the script is that is responsible for doing this. Basically I want to add the path to python utils to the $PATH...
For example, I brewed python brew python in order to get pip, then ran pip install flake8. Now
$ which flake8
flake8 not found
$ find / | grep flake8
...
......
/usr/local/share/python/flake8
$ ls -la /usr/local/share/python/
total 32
drwxr-xr-x 6 lust admin 204 Apr 2 18:15 .
drwxr-xr-x 15 lust admin 510 Apr 2 18:12 ..
lrwxr-xr-x 1 lust admin 45 Apr 2 18:13 Extras -> ../../Cellar/python/2.7.3/share/python/Extras
-rwxr-xr-x 1 lust admin 389 Apr 2 18:15 flake8
-rwxr-xr-x 1 lust admin 385 Apr 2 18:15 pep8
-rwxr-xr-x 1 lust admin 405 Apr 2 18:15 pyflakes
Alright!
$ cat /private/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
$ sudo vim /private/etc/paths
$ cat /private/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/share/python
Make a new shell, check $PATH, python not there. Okay.
Reboot, start a new shell, check $PATH, python still not there.
Oh, by the way, the solution is not to append, with anything like export PATH=$PATH:newpath, because I don't actually care to run flake8 from the command-line, I want Sublime Text 3' SublimeLinter plugin to actually know where it is without putting some hacky config in the settings for the editor.
I found the problem. As part of oh-my-zsh, zsh is set up to set PATH in the ~/.zshrc. I failed to consider this. When starting ST3 without using the command line invocation, it gains its own (incorrect) path environment variable, so that part still doesn't work. The ultimate resolution to the problem, however, is here.