Skip to content

Instantly share code, notes, and snippets.

@wattry
Last active December 1, 2022 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wattry/cd29a29506073f789c17a3e0fbc2652f to your computer and use it in GitHub Desktop.
Save wattry/cd29a29506073f789c17a3e0fbc2652f to your computer and use it in GitHub Desktop.
Running oracle instant client on Mac M1 ARM chipset

Installing Node

Ensure you have completely removed any versions of node you have. This is very important espciatlly if you have used brew to install. If you have downloaded the .pkg file from node.

Installing Rosetta 2

Rosetta is going to interpret the x86_64 binaries to ARM so you'll need to install this.

softwareupdate --install-rosetta

Install Oracle instant client

I have taken the liberty of creating a gist that provides a bash script to install and link the instant client. If you don't want to use it you can follow the steps contained within the bash script.

Add an alias (Optional)

In your shell config of choice add an alias to execute your package manager the arch software, to make it more convienent. Remember that if you do this all your node projects will be run this way which may have poorer performance. I'll use npm as an example since it's the entry point in my use case.

alias npm='arch -x86_64 npm'

Running the project

Firstly make sure you remove the package-lock.json and the node_modules to ensure nothing is being reused.

npm install

Once the install is complete you'll know the instant client has been found if node-oracle does not complain about not finding the x86_64 binaries.

Now run the entry script

npm start

And just like that it should hopefully work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment