Opened 4 years ago

Closed 4 years ago

#59632 closed defect (invalid)

(10.7.4, curl,youtube-dl) cannot force activate curl

Reported by: mrkapqa Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello ,

today i installed Osx Lion onmy MacMini and i could not install MacPorts latest from .pkg (The error is lke "this package has been probably damaged or altered . Please provide yourself a new copy of the package and try again")

therefore i installed the macports manually , like here

$ cd MacPorts-2.6.2/
$ ./configure
$ make
$ sudo make install

when installing youtube-dl manually i incur in error

curl: (35) Unknown SSL protocol error in connection to yt-dl.org:443 

so i try to upgrade curl

sudo port install curl
sudo port -f activate curl

but curl remains on system level

curl --version
curl 7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM SSL libz 

Change History (6)

comment:1 Changed 4 years ago by mrkapqa

perlbrew is also not installeing

 curl -L http://xrl.us/installperlosx | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   248  100   248    0     0    265      0 --:--:-- --:--:-- --:--:--     0
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Both the youtube-dl download URL and the perlbrew installer URL are redirects to GitHub. The curl provided by Apple links with the openssl provided by Apple. On OS X 10.8 and earlier, Apple's openssl is too old to talk to GitHub anymore, because GitHub has increased their security requirements beyond that which Apple's old openssl offers. (GitHub is not the only site that has imposed such requirements.) This is not a MacPorts bug, it's just a consequence of using an OS released in 2011 in 2019.

An alternative is to install the MacPorts curl port, which is linked with the MacPorts openssl port, which is new enough to talk to GitHub. If you have already used the system's curl in that terminal window, then you need to close the terminal window and open a new one for the shell to notice that a different curl is now available. This is not a MacPorts bug; it's just how shells work.

You should not use the -f flag unnecessarily. Installing a port automatically activates it.

I am not able to reproduce the difficulty you encountered installing MacPorts using the package installer. I downloaded MacPorts-2.6.2-10.7-Lion.pkg and it installed fine on my Lion machine. Make sure you downloaded exactly that file (the one for Lion, and not one for a different OS version). If you are sure you did that and it still doesn't work, please provide more details.

comment:4 Changed 4 years ago by mrkapqa

Hello ,

thank you very much for Oyour kind help. Could you please show me how to use the MacPorts curl`? I have the macports version installed but whenever i use curl, it goes back to systemlevel-curl.

the .pkg is probably not installeing because i am using lion 10.7.4 withouth the latest system-secutiy-updates?

have no idea why otheriwse it would not install.

comment:5 Changed 4 years ago by mrkapqa

ok, thanks , like this it functioned

sudo /opt/local/bin/curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

youtube-dl would install, but perlbrew fails

 sudo /opt/local/bin/curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
Password:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     3    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     3    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100   599    0   599    0     0    383      0 --:--:--  0:00:01 --:--:--  584k
100 1711k  100 1711k    0     0   207k      0  0:00:08  0:00:08 --:--:--  325k
/opt/local/bin/curl -L http://xrl.us/installperlosx | bash  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   248  100   248    0     0    340      0 --:--:-- --:--:-- --:--:-- 13052
100   162  100   162    0     0    156      0  0:00:01  0:00:01 --:--:--   156
100  3055  100  3055    0     0   1844      0  0:00:01  0:00:01 --:--:--  1844
Checking for .bash_profile... NOT FOUND
Creating /Users/rich/.bash_profile
Installing perlbrew
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Checking/updating /Users/rich/.bashrc to source perlbrew bashrc
bash: line 83: /Users/rich/.bashrc: Permission denied
Updating your current environment
bash: line 88: /Users/rich/perl5/perlbrew/etc/bashrc: No such file or directory
Installing Perl 5.28.0 through perlbrew
bash: line 91: perlbrew: command not found
Setting Perl 5.28.0 to default
bash: line 94: perlbrew: command not found
Installing cpanm,
bash: line 97: perlbrew: command not found

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added
Resolution: invalid
Status: newclosed

It sounds like you don't have your PATH environment variable set up properly to include the MacPorts prefix. The .pkg installer would have set it up for you. Since you installed from source, you have to set it up manually. That would explain why the shell is still finding Apple's curl, and why the perlbrew's installperlosx failed, since it itself again runs curl to download something else.

If you have not updated to the latest version of Mac OS X Lion with all the security updates (10.7.5 build 11G63), please do so. The .pkg installer works for me on that version. Of course, now that you've already installed from source, there's no need to use the .pkg installer anymore.

Note that we do have a port for youtube-dl in MacPorts, and I recommend you install that rather than trying to install it manually into /usr/local. We do not recommend having software installed in /usr/local while using MacPorts.

If you need further help using MacPorts, please write to the macports-users mailing list.

Note: See TracTickets for help on using tickets.