• Register
0 votes
296 views

Problem :

Currently I am learning Homebrew (Mojave). Recently I tried to install the node using Homebrew (Mojave) but after sometime my  Php stopped working and now if I try to run the command php -v I face below error:

php -v
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

I have also tried to uninstall my both node and icu4c but my problem still persists

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I you are facing above error then you sould try below command

 brew switch icu4c 62.1 Note : This command will only work if you have already installed the 62.1 in the past. If you don’t have it then you need to follow detailed procedure as given below:

The first step is to deep clone the Homebrew repo. It will take some time: 

git -C $(brew --repo homebrew/core) fetch --unshallow

brew log icu4c use this command to track down the commit that references the 62.1.

Then you should execute the commands exactly as shown below:

cd $(brew --repo homebrew/core)

git checkout 575eb4b -- Formula/icu4c.rb

brew uninstall --ignore-dependencies icu4c

brew install icu4c 

Now you should be having the correct version of your dependency. Now just to cleanup the modified recipe execute below command.

git reset && git checkout

Now your issue must be resolved. 

5 2 1
4,980 points

Related questions

0 votes
1 answer 7 views
0 votes
1 answer 462 views
462 views
Problem : I made the big mistake of trying remove all sudo dependencies. I simply downloaded npm as a package from the preferred site and did a manual global install. But I had to always run with the sudo. That's why I tried to uninstall and tried to run it with homebrew. ... once built. Run `brew link` on these: Now I am completely stuck and don't know how to solve it. Does anybody have any clue?
asked Nov 25, 2019 alecxe 7.5k points
0 votes
1 answer 590 views
590 views
Problem : I am new to npm and now I am facing strange looking below error “Error: EACCES: permission denied, access '/usr/local/lib/node_modules'” Detailed error as below: npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ... code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } Have somebody fixed this before?
asked Feb 20 mphil 2.3k points
0 votes
2 answers 370 views
370 views
Problem : I want to to run my NodeJS version with the nvm but getting following error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global"Run `npm config delete prefix` or `nvm use --delete- ... it. I have set the prefix on purpose to avoid the sudo npm How can I use nvm without losing the prefix for my globally installed packages?
asked Nov 29, 2019 alecxe 7.5k points