homebrew-homebrew icon indicating copy to clipboard operation
homebrew-homebrew copied to clipboard

Mac M1 chntpw not building (Openssl 1.0 requirement not satisfied)

Open ameeno opened this issue 4 years ago • 52 comments

Hello.

I have a mac M1 mba and I am trying to install sidneys/homebrew/chntpw

i have tried via rosetta and also via regular arm homebrew. unfortunately there is an issue building openssl 1.0 for this cpu,

there seems to be some instructions to build it manually on openssl github repo, any chance this can be incorporated into your script?

ameeno avatar Jan 17 '21 16:01 ameeno

I have same problem.


x86_64cpuid.s:273:7: error: invalid token in expression
 cmpq $0,%rax
      ^
x86_64cpuid.s:273:7: error: invalid operand
 cmpq $0,%rax
      ^
x86_64cpuid.s:274:9: error: unknown token in expression
 cmoveq %rcx,%rax
        ^
x86_64cpuid.s:274:9: error: invalid operand
 cmoveq %rcx,%rax
        ^
make[1]: *** [x86_64cpuid.o] Error 1
make: *** [build_crypto] Error 1

Do not report this issue to Homebrew/brew or Homebrew/core!

fengsx1995 avatar Jan 27 '21 03:01 fengsx1995

I have the same issue. Anyone got it fixed?

d4rkm0nkey avatar Mar 22 '21 16:03 d4rkm0nkey

I have the same issue. Anyone got it fixed?

To get it fixed, use @itsmattkc's PR, then download chntpw from sidney's cask, here: https://github.com/sidneys/chntpw/archive/0.99.6.tar.gz

Untar the downloaded file, edit the Makefile replace the line that contains OSSLPATH by this one:

OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.0.2u

Save the Makefile, go to the terminal, navigate to the folder where chntpw is located, execute make and, finally, cp chntpw /opt/hombrew/bin and you're good to go

Kakise avatar Jun 25 '21 22:06 Kakise

I have the same issue. Anyone got it fixed?

To get it fixed, use @itsmattkc's PR, then download chntpw from sidney's cask, here: https://github.com/sidneys/chntpw/archive/0.99.6.tar.gz

Untar the downloaded file, edit the Makefile replace the line that contains OSSLPATH by this one:

OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.0.2u

Save the Makefile, go to the terminal, navigate to the folder where chntpw is located, execute make and, finally, cp chntpw /opt/hombrew/bin and you're good to go

i edit the Makefile replace the line that contains OSSLPATH by this one 'OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.1.1k' ,i have get a new issue gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.1.1k/include -Wl chntpw.c warning: unknown warning option '-Wl' [-Wunknown-warning-option] chntpw.c:141:34: error: expected expression DES_set_odd_parity((des_cblock *)key); ^ chntpw.c:141:22: error: use of undeclared identifier 'des_cblock' DES_set_odd_parity((des_cblock *)key); ^ chntpw.c:186:3: error: unknown type name 'des_key_schedule'; did you mean 'DES_key_schedule'? des_key_schedule ks; ^~~~~~~~~~~~~~~~ DES_key_schedule /opt/homebrew/Cellar/[email protected]/1.1.1k/include/openssl/des.h:43:3: note: 'DES_key_schedule' declared here } DES_key_schedule; ^ chntpw.c:187:3: error: unknown type name 'des_cblock'; did you mean 'DES_cblock'? des_cblock deskey; ^~~~~~~~~~ DES_cblock

994279206 avatar Jul 08 '21 06:07 994279206

@994279206 It's because chntpw v 0.99.6 uses openssl 1.0 as a dependency, you absolutely need to install that and use it

Kakise avatar Jul 08 '21 08:07 Kakise

I think the repository owner will not fix about it.

So, I have created a repositories about chntpw, including homebrew tap.

Installation

brew tap minacle/chntpw
brew install minacle/chntpw/chntpw

Repositories

Issues and PRs are welcome.


(+) Thank @aiden-leong for correction!

minacle avatar Jul 23 '21 15:07 minacle

I have the same issue. Anyone got it fixed?

To get it fixed, use @itsmattkc's PR, then download chntpw from sidney's cask, here: https://github.com/sidneys/chntpw/archive/0.99.6.tar.gz Untar the downloaded file, edit the Makefile replace the line that contains OSSLPATH by this one:

OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.0.2u

Save the Makefile, go to the terminal, navigate to the folder where chntpw is located, execute make and, finally, cp chntpw /opt/hombrew/bin and you're good to go

Made a patch for it.

https://gist.github.com/minacle/87d11243b135b2041c945f1287d33d7e

Easy Installation

curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected]
curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb
brew install --formula --build-from-source ./[email protected]
brew install --formula --build-from-source ./chntpw.rb
rm ./[email protected] ./chntpw.rb

Thanks, @minacle! It worked for me

anton-patrushev avatar Oct 26 '21 19:10 anton-patrushev

I have the same issue. Anyone got it fixed?

To get it fixed, use @itsmattkc's PR, then download chntpw from sidney's cask, here: https://github.com/sidneys/chntpw/archive/0.99.6.tar.gz Untar the downloaded file, edit the Makefile replace the line that contains OSSLPATH by this one:

OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.0.2u

Save the Makefile, go to the terminal, navigate to the folder where chntpw is located, execute make and, finally, cp chntpw /opt/hombrew/bin and you're good to go

Made a patch for it. https://gist.github.com/minacle/87d11243b135b2041c945f1287d33d7e

Easy Installation

curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected]
curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb
brew install --formula --build-from-source ./[email protected]
brew install --formula --build-from-source ./chntpw.rb
rm ./[email protected] ./chntpw.rb

Thanks, @minacle! It worked for me

the Easy Installation script works

YUX avatar Nov 09 '21 10:11 YUX

I think the repository owner will not fix about it.

So, I have created a repositories about chntpw, including homebrew tap.

Installation

brew tap minacle/chntpw
brew install chntpw

Repositories

Issues and PRs are welcome.

Should be:

brew tap minacle/chntpw
brew install minacle/chntpw/chntpw

aiden-leong avatar Nov 23 '21 11:11 aiden-leong

Update. This fixed it:

Easy Installation curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected] curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb brew install --formula --build-from-source ./[email protected] brew install --formula --build-from-source ./chntpw.rb rm ./[email protected] ./chntpw.rb

YOU NEED TO $brew install aria2 YOU NEED TO CHMOD +X uup_download_macos RUN ./uup_download_macos

BAM it starts downloading.

ashtonvalasko avatar Nov 29 '21 02:11 ashtonvalasko

curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected] curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb brew install --formula --build-from-source ./[email protected] brew install --formula --build-from-source ./chntpw.rb rm ./[email protected] ./chntpw.rb

After running the script make gives this error :

make gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl chntpw.c gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl ntreg.c gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl edlib.c gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl cpnt.c gcc -c -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl reged.c gcc -DUSEOPENSSL -g -I. -I/opt/homebrew/Cellar/[email protected]/1.0.2u/include -Wl -o cpnt cpnt.o -L/opt/homebrew/Cellar/[email protected]/1.0.2u/lib /opt/homebrew/Cellar/[email protected]/1.0.2u/lib/libcrypto.a clang: error: no such file or directory: '/opt/homebrew/Cellar/[email protected]/1.0.2u/lib/libcrypto.a' make: *** [cpnt] Error 1 make: *** Waiting for unfinished jobs....

Do not report this issue to Homebrew/brew or Homebrew/core!

I'm getting this issue... after running the easy installation sxript

kuldeepaher01 avatar Dec 21 '21 07:12 kuldeepaher01

@kuldeepaher01, Please try my new solution that using homebrew tap. https://github.com/sidneys/homebrew-homebrew/issues/2#issuecomment-885728072

minacle avatar Dec 21 '21 12:12 minacle

As I mentioned before, this works:

brew tap minacle/chntpw
brew install minacle/chntpw/chntpw

It's not a good idea to provide brew users a long bash script as I've recommended brew to many friends who don't have IT backgrounds.

Let's keep this thread nice and clean. Deal?

aiden-leong avatar Dec 22 '21 15:12 aiden-leong

I have the same issue. Anyone got it fixed?

To get it fixed, use @itsmattkc's PR, then download chntpw from sidney's cask, here: https://github.com/sidneys/chntpw/archive/0.99.6.tar.gz Untar the downloaded file, edit the Makefile replace the line that contains OSSLPATH by this one:

OSSLPATH=/opt/homebrew/Cellar/[email protected]/1.0.2u

Save the Makefile, go to the terminal, navigate to the folder where chntpw is located, execute make and, finally, cp chntpw /opt/hombrew/bin and you're good to go

Made a patch for it. https://gist.github.com/minacle/87d11243b135b2041c945f1287d33d7e

Easy Installation

curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected]
curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb
brew install --formula --build-from-source ./[email protected]
brew install --formula --build-from-source ./chntpw.rb
rm ./[email protected] ./chntpw.rb

Thanks, @minacle! It worked for me

the Easy Installation script works

This fixed the issue for me

pr0b3r7 avatar Jan 01 '22 18:01 pr0b3r7

Hello All,

I followed the solutions above, only to find out while it generates the ISO file to create a Windows 10 VM from. According to Parallels, in order to create a VM for Windows 10 on a M1 chipset a VHDX file is needed. Is there a way that this process can generate a VHDX file from this? ISO files from what I understand are only compatible for Intel based machines.

Thanks, Andrew

GeoSpecs13 avatar Feb 04 '22 20:02 GeoSpecs13

Yes ! I have secretly l severely vhdx. Will give them a shot next. Thanks,,!(¿

On Fri, Feb 4, 2022, 15:23 Andrew Sauerwin @.***> wrote:

Hello All,

I followed the solutions above, only to find out while it generates the ISO file to create a Windows 10 VM from. According to Parallels, in order to create a VM for Windows 10 on a M1 chipset a VHDX file is needed. Is there a way that this process can generate a VHDX file from this? ISO files from what I understand are only compatible for Intel based machines.

Thanks, Andrew

— Reply to this email directly, view it on GitHub https://github.com/sidneys/homebrew-homebrew/issues/2#issuecomment-1030322457, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXFNE3JNPHWRNFSHV7TMETUZQYTHANCNFSM4WGHDMNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

ashtonvalasko avatar Feb 04 '22 23:02 ashtonvalasko

Update. This fixed it:

Easy Installation curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected] curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb brew install --formula --build-from-source ./[email protected] brew install --formula --build-from-source ./chntpw.rb rm ./[email protected] ./chntpw.rb

YOU NEED TO $brew install aria2 YOU NEED TO CHMOD +X uup_download_macos RUN ./uup_download_macos

BAM it starts downloading.

This worked for me <3

jes-ale avatar Feb 10 '22 05:02 jes-ale

Update. This fixed it: Easy Installation curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected] curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb brew install --formula --build-from-source ./[email protected] brew install --formula --build-from-source ./chntpw.rb rm ./[email protected] ./chntpw.rb

YOU NEED TO $brew install aria2 YOU NEED TO CHMOD +X uup_download_macos RUN ./uup_download_macos BAM it starts downloading.

This worked for me <3

~/Desktop  ❯❯❯ brew install --formula --build-from-source ./[email protected]
==> Downloading https://gist.githubusercontent.com/felixbuenemann/5f4dcb30ebb3b86e1302e2ec305bac89/raw/b339a33ff072c9747df21e2558c36634dd62c195/open
curl: (7) Failed to connect to gist.githubusercontent.com port 443: Bad file descriptor

Error: [email protected]: Failed to download resource "[email protected]"

Hmm running into this issue, looking into this but yeah, not able to get this to install

edit: @minacle 's method worked beautifully. I had some unrelated networking issues to work through first 🙃

dhanani94 avatar Feb 19 '22 16:02 dhanani94

@dhanani94, Please try my new solution that using homebrew tap. https://github.com/sidneys/homebrew-homebrew/issues/2#issuecomment-885728072

minacle avatar Feb 20 '22 06:02 minacle

thanks!

yeldos23 avatar Jul 07 '22 15:07 yeldos23

I have gone through everything, but i still get this error One of required applications is not installed. The following applications need to be installed to use this script:

  • aria2c
  • cabextract
  • wimlib-imagex
  • chntpw
  • genisoimage or mkisofs

macOS requires Homebrew (https://brew.sh) to install the prerequisite software. If you use Homebrew, you can install these using: brew tap sidneys/homebrew brew install aria2 cabextract wimlib cdrtools sidneys/homebrew/chntpw

Adithr123 avatar Aug 15 '22 23:08 Adithr123

I have tried everyones methoods, reinstalling everything, ect

Adithr123 avatar Aug 15 '22 23:08 Adithr123

Minacle's method worked for me

aycajr avatar Aug 29 '22 16:08 aycajr

Hi I have a similar issue, I've tried minacle method as well as the other the other solution proposed by ashtonvalasko. I'm trying to build a iso file for windows on mac.

The current error message when running ./uup_download_macos.sh is "genisoimage nor mkisofs does seem to be installed", although I have repeatedly tried to install cdrtools over homebrew. Can you help me on this topic?

7081869 avatar Sep 22 '22 03:09 7081869

@7081869

You should install cabextract, cdrtools, and wimlib too, as wrote in readme.unix.md.

Try below:

brew install cabextract cdrtools wimlib

and then retry your script.

If the problem not resolved, you may need to (re)link them explicitly.

brew unlink cabextract cdrtools wimlib
brew link cabextract cdrtools wimlib

minacle avatar Sep 22 '22 11:09 minacle

brew install aria2 cabextract cdrtools wimlib

the following is for installing chntpw (instead of messing with make file)

curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/[email protected]
curl -LO https://gist.github.com/minacle/e9dedb8c17025a23a453f8f30eced3da/raw/908b944b3fe2e9f348fbe8b8800daebd87b5966c/chntpw.rb

brew install --formula --build-from-source ./[email protected]

mkdir -p /opt/homebrew/Cellar/[email protected]
sudo ln -s /usr/local/Cellar/[email protected]/1.0.2u /opt/homebrew/Cellar/[email protected]/1.0.2u
brew install --formula --build-from-source ./chntpw.rb
sudo rm /opt/homebrew/Cellar/[email protected]/1.0.2u

I didn't have /opt/homebrew/ at all, so I removed the whole directory when finished.

if chntpw isn't showing up in terminal as available, and brew link chntpw says it is already linked, start new terminal session (or type bash or zsh and press enter) then run ./uup_download_macos.sh -- and voila!

moekhalil avatar Sep 22 '22 18:09 moekhalil

I got another error when running "brew install aria2 cabextract wimlib cdrtools sidneys/homebrew/chntpw" anybody can help?

Last 15 lines from /Users/[username]/Library/Logs/Homebrew/[email protected]/03.make: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: make[1]: *** [test_ec] Error 1 make: *** [tests] Error 2

SamSlainte avatar Mar 31 '23 08:03 SamSlainte

me explicas como aplicaste la solucion? por favor, no soy muy experimentado en esto de la terminal

08Jesus02 avatar Apr 04 '23 07:04 08Jesus02

I got another error when running "brew install aria2 cabextract wimlib cdrtools sidneys/homebrew/chntpw" anybody can help?

Last 15 lines from /Users/[username]/Library/Logs/Homebrew/[email protected]/03.make: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:100B906B:elliptic curve routines:EC_POINT_set_affine_coordinates_GF2m:point is not on curve:ec_lib.c:994: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: 8009892332:error:1007C06B:elliptic curve routines:EC_POINT_set_affine_coordinates_GFp:point is not on curve:ec_lib.c:968: make[1]: *** [test_ec] Error 1 make: *** [tests] Error 2

brew tap minacle/chntpw
brew install aria2 cabextract wimlib cdrtools minacle/chntpw/chntpw

it's work for me. Ventura

Third33 avatar Apr 05 '23 20:04 Third33

Also getting the same issue as SamSlainte

Tried with a fresh Ventura 13.3 build on a M1 MBP multiple times. Latest Brew used, openssl1.0 never successfully runs make test, it gets the elliptic curve routines error every time.

CrimsonCleaver avatar Apr 06 '23 08:04 CrimsonCleaver