colorls
colorls copied to clipboard
I dont think colorls is installing?
Description
I keep running into an issue with getting colorls
installed. I saw issue number #280 and i've tried running with sudo and still nothing.
below is what i keep running into.
Traceback (most recent call last):
10: from /usr/local/bin/colorls:23:in `<main>'
9: from /usr/local/bin/colorls:23:in `load'
8: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/exe/colorls:21:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/lib/colorls.rb:9:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale.rb:15:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle - /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle (LoadError)
- Relevant Issues : (none)
- Relevant PRs : (none)
- Type of issue :
- [ ] Installation
- [ ] Font-related
- [ ] Feature request
- [ ] Bug in existing feature
- [ ] Developer mode : Code quality / Tests / Documentation
Is this on a M1 mac? Try to run colorls in rosetta / x86 mode.
Yes I’m on an M1. OK I’ll have to give it a shot, thanks!
- Allan On Apr 11, 2021, 11:39 AM -0400, Claudio Bley @.***>, wrote:
Is this on a M1 mac? Try to run colorls in rosetta / x86 mode. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Related to #425
I'm sorry as i forgot to mention that this issue pops up when i try to add this to my .zshrc file
alias ls=’colorls — light — sort-dirs — report’
alias lc=’colorls — tree — light’
I'm sorry as i forgot to mention that this issue pops up when i try to add this to my .zshrc file
alias ls=’colorls — light — sort-dirs — report’ alias lc=’colorls — tree — light’
That looks fishy too. Why are you using backticks? Why only single dashes? And why are the flags separated with spaces from the dash?
https://medium.com/@caulfieldOwen/youre-missing-out-on-a-better-mac-terminal-experience-d73647abf6d7
This is the link that i was following to make the changes. Also, a class I'm taking online provided the same steps and it worked there however i'm not getting any luck. i've also tried eliminated the spaces and it doesn't work.
I'm trying to get this theme going. Those lines are to create the folder experience.
https://medium.com/@caulfieldOwen/youre-missing-out-on-a-better-mac-terminal-experience-d73647abf6d7
The rendering of the code is broken on this page.
It should look like this:
alias ls='colorls --light --group-directories-first --report'
alias lc='colorls --tree --light'
Do not blindly follow tutorials on the web, try to understand the implications and meaning first.
alias ls='colorls --light --group-directories-first --report' alias lc='colorls --tree --light'
When i add that to zshrc
i get the original error. Thank you so much for your help on this @avdv . I'm going to abandon ship as it just seems to not work and I can do without this functionality.
Traceback (most recent call last):
10: from /usr/local/bin/colorls:23:in `<main>'
9: from /usr/local/bin/colorls:23:in `load'
8: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/exe/colorls:21:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/lib/colorls.rb:9:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale.rb:15:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlsym(0x7fdfc5741620, Init_clocale): symbol not found - /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle (LoadError)
When i add that to
zshrc
i get the original error.
Yes, of course. Since you did not run it in x86 mode as I told you to. Just try with
arch -x86_64 zsh
If that works, prefix any ruby command with it...
from what i've found if i run things in rosetta its just like running it in x86. I have a version of my iterm2 that opens using rosetta wouldn't that work as well?
from what i've found if i run things in rosetta its just like running it in x86. I have a version of my iterm2 that opens using rosetta wouldn't that work as well?
Yes, whatever. But I thought the goal would be to get colorls to work normally as well.
Ok so i'll just need to follow your instructions in https://github.com/athityakumar/colorls/issues/425#issuecomment-741043399
I'm going to wait as you suggested that there are still too many issues and compatibility problems with the Ruby ARM Version.
Thanks again @avdv . I dont want you wasting anymore of your time on me! I appreciate you and the time you spent helping out my friend!
Maybe I am oversimplifying, but I thought this would be as easy as
- installing colorls inside a shell / terminal started within Rosetta
- try to run
colorls
inside Rosetta - if that works, instead of calling
colorls
callarch -x86_64 colorls
everywhere - ie. update the aliases
Did the above and I cannot get it to work.
same problem on M1 I try sudo/rosetta/arch and same problem 😄
I'm facing the same issue with colorls.
I was able to solve the problem inspired on this issue from Flutter repo.
❯ arch -x86_64 sudo gem install colorls
Password:
*******************************************************************
Changes introduced in colorls
Sort by dirs : -sd flag has been renamed to --sd
Sort by files : -sf flag has been renamed to --sf
Git status : -gs flag has been renamed to --gs
Clubbed flags : `colorls -ald` works
Help menu : `colorls -h` provides all possible flag options
Tab completion enabled for flags
-t flag : Previously short for --tree, has been re-allocated to sort results by time
-r flag : Previously short for --report, has been re-allocated to reverse sort results
Man pages have been added. Checkout `man colorls`.
*******************************************************************
Successfully installed colorls-1.4.4
Parsing documentation for colorls-1.4.4
Installing ri documentation for colorls-1.4.4
Done installing documentation for colorls after 0 seconds
1 gem installed
❯ colorls
Traceback (most recent call last):
10: from /Users/felipython/.gem/ruby/2.6.0/bin/colorls:23:in `<main>'
9: from /Users/felipython/.gem/ruby/2.6.0/bin/colorls:23:in `load'
8: from /Users/felipython/.gem/ruby/2.6.0/gems/colorls-1.4.4/exe/colorls:21:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /Users/felipython/.gem/ruby/2.6.0/gems/colorls-1.4.4/lib/colorls.rb:9:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale.rb:15:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle - /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle (LoadError)
❯ arch -x86_64 colorls
Applications/ Documents/ Library/ Music/ Public/ getting-started/
Desktop/ Downloads/ Movies/ Pictures/ dev/
~ ················································································
@lipemorais thanks for verifying my instructions from above are working... :laughing:
Closing as resolved...
There is just one small change at the first point. Start the terminal using Rosetta was not necessary.
Use sudo was also important to make it work.
Update: After update my MacOS to Big Sur 11.3.1
I had to remove arch -x86_64
from my alias arch -x86_64 colorls --sd -A
now I can use just colorls --sd -A
~ ·································································································································· 1.33 18% 7.07G at 19:54:15
❯ arch -x86_64 colorls --sd -A
arch: posix_spawnp: colorls: Bad CPU type in executable
~ ·································································································································· 1.35 18% 7.04G at 19:55:21
❯ colorls --sd -A
.Trash/ .oh-my-zsh/ Desktop/ Pictures/ .bash_history .tool-versions
.asdf/ .rbenv/ Documents/ Public/ .bashrc .z
.cache/ .ssh/ Downloads/ dev/ .fzf.bash .zcompdump-felipython’s MacBook Air-5.8
.config/ .vscode/ Library/ getting-started/ .fzf.zsh .zprofile
.docker/ .zsh_sessions/ Movies/ .CFUserTextEncoding .p10k.zsh .zsh_history
.gem/ Applications/ Music/ .DS_Store .python_history .zshrc
~ ·································································································································· 1.37 18% 7.05G at 19:55:30
❯
There is just one small change at the first point. Start the terminal using Rosetta was not necessary.
I thought running in Rosetta mode is equivalent to running a command wrapped in arch -x86_64 ...
?
Use sudo was also important to make it work.
That's only needed when you want to install colorls system wide. I never do this; I have enabled the gem --user-install
option and just install into my local user gem folder.
After update my MacOS to Big Sur 11.3.1
I had to remove
arch -x86_64
from my aliasarch -x86_64 colorls --sd -A
now I can use justcolorls --sd -A
That's nice. Thanks for the update! :+1:
In my case, adding arch -x86_64
to any colorls
commands produces a new error:
Traceback (most recent call last):
10: from /usr/local/bin/colorls:23:in `<main>'
9: from /usr/local/bin/colorls:23:in `load'
8: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/exe/colorls:21:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/lib/colorls.rb:9:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale.rb:15:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlsym(0x7fe1fa518f00, Init_clocale): symbol not found - /Library/Ruby/Gems/2.6.0/gems/clocale-0.0.4/lib/clocale/clocale.bundle (LoadError)
Anyone have an idea on how to fix this?
Anyone have an idea on how to fix this?
Seems like you should rebuild / reinstall the clocale gem.
@avdv That worked, awesome! Thanks
Running any colorls command such as arch -x86_64 colorls --group-directories-first --hyperlink
produces this error.
Traceback (most recent call last):
7: from /usr/local/bin/colorls:23:in `<main>'
6: from /usr/local/bin/colorls:23:in `load'
5: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/exe/colorls:21:in `<top (required)>'
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/colorls-1.4.4/lib/colorls.rb:4:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/etc-1.2.0/lib/etc.bundle, 9): no suitable image found. Did find: (LoadError)
/Library/Ruby/Gems/2.6.0/gems/etc-1.2.0/lib/etc.bundle: mach-o, but wrong architecture
/Library/Ruby/Gems/2.6.0/gems/etc-1.2.0/lib/etc.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/2.6.0/gems/etc-1.2.0/lib/etc.bundle
Trying to install it again with arch -x86_64 sudo gem install colorls
produces this error:
ERROR: Loading command: install (LoadError)
dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle, 9): no suitable image found. Did find:
/Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle: mach-o, but wrong architecture
/Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
I'm on a M1 too, running iTerm with Rosetta and with zshrc configuration. I have to use it with Rosetta for compatibility purposes on a repo. Even commenting all the aliases in the zshrc file produces the same error, I'm not able to make a ls
command anymore :(. Does anybody have a solution for this?
If you using Colorls
on mac you can do the following
cd /usr/local/Cellar/ruby/x.x.x/bin [my current version is x.x.x = 3.0.2]
./gem uninstall colorls
it will ask you to remove the colorls then at the same directory
./gem install colorls
Now, you can link your colorls as shown in my thread Step-3-
- The problem is that you have two different (gem) package managers to the ruby, one comes with brew and another one installed by apple I think. this will cause the miss-aligned I always forget how to install colorls v
Hi @Ghasak thanks for the reply! Thought I don't have this Cellar
folder. Is there any way to fix this? I would prefer uninstall colorls (~~don't know how either~~) than not having the ls
command. I'm really stuck on this. Of course I would prefer to make colorls to work normally, but if it can't work in my terminal opened with Rosetta I'm fine with just uninstalling it. cc: @avdv if you could help with any advice on this as well.
Thanks in advance!
Edit: nvm about uninstallation. I just ran gem uninstall colorls
and it uninstalled, but still preferred to keep this working 😞 Really like this lib. When trying to reinstalling it, I get this error:
don't have this
Cellar
folder. Is there any w
Hi @bolognini, Sorry to hear that you couldn't install it so far, please check my answer here;
https://stackoverflow.com/a/67506010/10768894
Could you please let me know your current operating system, do you have (Homebrew) installed? if you have don't check them out here:
homebrew websitee
then:
brew install colorls
let me know how it goes. I can help for sure.
Currently, I am using it with my macOs
located at
/usr/local/lib/ruby/gems/3.0.0/bin/colorls
then source this path in your zsh, or bash with ($PATH) or symlink it with (ln -s /original/location/ /new/loction)