Help with unbuffer: can't find package expect


(Matt Thompson) #1

All,

I’m trying to figure out how to install and run unbuffer on my mac with Homebrew. Now, I first tried installing with brew install expect but when I try to run:

$ unbuffer
can't find package Expect
    while executing
"package require Expect"
    (file "/usr/local/bin/unbuffer" line 6)

So, I ran brew info expect and tried the interesting variant --with-brewed-tk but:

$ brew install expect --with-brewed-tk
==> Downloading https://downloads.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
==> Downloading from https://astuteinternet.dl.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: d082bf340fdb7a85b1e4e5df4d967d0140835db34a8a035c3102abb5eb62d450
Actual: 49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
Archive: /Users/mathomp4/Library/Caches/Homebrew/expect-5.45.4.tar.gz
To retry an incomplete download, remove the file above.

So…yeah. I’m guessing I just need something simple to get the basic variant working, but I’m not exactly sure what. Expect does work:

$ expect
expect1.1> 

Any ideas on what my environment needs?


(Sean Molenaar) #2

It seems like the issue is with expect is that the download doesn’t go through. You’re getting a different file than was expected. Check your internet connection (not behind a login portal or something), remove the archive and try again.


(Matt Thompson) #3

No, the file seems to have the exact checksum:

(52) $ brew uninstall expect
Error: No such keg: /usr/local/Cellar/expect
(53) $ brew install expect --with-brewed-tk
==> Downloading https://downloads.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
==> Downloading from https://iweb.dl.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: d082bf340fdb7a85b1e4e5df4d967d0140835db34a8a035c3102abb5eb62d450
Actual: 49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
Archive: /Users/mathomp4/Library/Caches/Homebrew/expect-5.45.4.tar.gz
To retry an incomplete download, remove the file above.
(54) $ rm /Users/mathomp4/Library/Caches/Homebrew/expect-5.45.4.tar.gz
(55) $ curl -O https://iweb.dl.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  617k  100  617k    0     0  3088k      0 --:--:-- --:--:-- --:--:-- 3103k
(56) $ shasum -a 256 expect5.45.4.tar.gz
49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34  expect5.45.4.tar.gz

(Sean Molenaar) #4

I’ll check to see what it gave me as a mirror, but I ran the command as you did and for me the shasum was correct.

If you trust the archive you get you can always brew edit the formula to have your version of the shasum. But I wouldn’t recommend it.