dyld[45781]: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib Referenced from: /opt/local/bin/curl

Viewed 25

I have searched all over the internet for a solution to this including some of my own. This error occurs whenever I try to run a certain Bash script on my macOS Monterey 12.3.1 with Intel Core i5.

dyld[45781]: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
  Referenced from: /opt/local/bin/curl
  Reason: tried: '/opt/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/local/lib/libssl.1.0.0.dylib' (no such file), '/usr/lib/libssl.1.0.0.dylib' (no such file)
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at /opt/local/bin/json_pp line 43.

I have tried reinstalling OpenSSL, upgrading Bash, downloading different versions of OpenSSL from different sources, and creating shortcuts to the library, but it appears the OS is stubborn about not having the version 1.0.0 in the library. Can anybody help me? Any of the solutions I have found seem to be outdated as of macOS Monterey.

Here is the important part of the Bash code for reference:

json_array() {
  echo -n '['
  while [ $# -gt 0 ]; do
    x=${1//\\/\\\\}
    echo -n \"${x//\"/\\\"}\"
    [ $# -gt 1 ] && echo -n ', '
    shift
  done
  echo ']'
}

arr=`json_array "${crn_list[@]}"`

curl -H "$token" -H "Content-Type: application/json" \
  --request POST --data-raw "{\"ECRN\": $arr, \"SCRN\":[]}"\
  $url | json_pp
0 Answers
Related