bash broken osx “[Processo concluído]”

0

Eu tive um erro em um script que executava 'brew unlink bash'. Comecei então a receber: Warning: bash already installed, it's just not linked

Eu tentei

brew update && brew install bash
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash 'logname'

Eu tentei corrigi-lo removendo /usr/local/bin/bash de /etc/shells com base em uma resposta diferente, mas esqueci de adicioná-lo novamente antes de sair do terminal. Como não posso editar o arquivo novamente porque meu terminal não funciona:

login: /usr/local/bin/bash: No such file or directory

[Process completed]

Após seguir as instruções sobre como consertar o terminal temporariamente, ainda tenho problema:

cchilders:~ 
$ sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
Password:

cchilders:~ 
$ chsh -s /usr/local/bin/bash 'logname'
Changing shell for cchilders.
Password for cchilders: 
chsh: WARNING: shell '/usr/local/bin/bash' does not exist

cchilders:~ 
$ brew update && brew install bash
Updated 2 taps (caskroom/cask, caskroom/versions).
No changes to formulae.
Warning: bash-4.4.12 already installed, it's just not linked.

Como você pode restaurar os terminais no osx? Obrigado

    
por codyc4321 06.04.2017 / 23:45

2 respostas

1

Abra o Terminal, escolha Shell → Novo Comando e execute /bin/bash .

    
por 06.04.2017 / 23:50
0

Com base no link , eu corri

brew doctor
# explained to link bash in the middle of output
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run 'brew link' on these:
  bash

brew link bash

cchilders:~ 
$ echo $BASH_VERSION 
4.4.12(1)-release
    
por 07.04.2017 / 00:51