question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install in macOS BigSur (M1 chip)

See original GitHub issue

I’m trying to install fastecdsa on macOS BigSur (M1 chip) by running

(venv) $ pip3 install fastecdsa

and even though I previously installed gmp:

$ brew install gmp

it cant find the lib, no matter what I do

    src/curve.h:4:10: fatal error: 'gmp.h' file not found
    #include "gmp.h"

Although the error changed when I created a symlink

ln -s /opt/homebrew/include/gmp.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include

and now I get:

    ld: library not found for -lgmp
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/bin/gcc' failed with exit code 1

I also tried:

  • passing the path via env CFLAGS, LDFLAGS and both via global env export (export CFLAGS=...)
LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib pip3 install fastecdsa
CFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include pip3 install fastecdsa
  • xcode-select --install
  • endlessly brew uninstall gmp and brew install gmp, even brew reinstall gmp and brew unlink gmp
  • installing rosetta2
  • turning it off and on again

I can’t put my finger on it 😦

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

60reactions
milancermakcommented, Oct 2, 2021

This worked for me:

CFLAGS=-I/opt/homebrew/opt/gmp/include LDFLAGS=-L/opt/homebrew/opt/gmp/lib pip install fastecdsa

2reactions
neilmicommented, Jul 13, 2022

hey guys, i had this exact same problem on mac monterey m1 the way i solved it:

  1. uninstalled python completely
  2. installed python3.x exactly like as this article says: https://diewland.medium.com/how-to-install-python-3-7-on-macbook-m1-87c5b0fcb3b5
  3. ibrew install gmp
  4. then it should work 😃

@martriay

Read more comments on GitHub >

github_iconTop Results From Across the Web

If an error occurred while updating or installing macOS
If an error occurred while updating or installing macOS · Check your internet connection · Install in safe mode · Install after repairing...
Read more >
Fix macOS Big Sur Problems(Can't Install on Macintosh HD)
If macOS Big Sur cannot be installed on Macintosh HD, you can try installing it in Safe Mode. Follow these steps to boot...
Read more >
Can't install macOS Ventura Problems Mac, M1 MacBook Fixed
Steps to Fix Cannot install macOS Ventura/Monterey: 2022 MacOS · Fix 1: Delete installer File and Re-download macOS · Apple System Status ·...
Read more >
Cannot Install MacOS Big Sur - Mac Research
Cannot install MacOS Big Sur fix · Use the Power button on your Mac to Force Quit the computer. · When the computer...
Read more >
What to do if your Ventura update is stuck - Macworld
So, if you've seen the warning: 'The macOS installation couldn't be ... on whether your Mac is powered by Intel or an M1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found