Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#55539 closed defect (invalid)

installer: Error the package path specified was invalid

Reported by: mcandre (Andrew Pennebaker) Owned by:
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc:
Port:

Description

I'm trying to install MacPorts v2.4.2 in High Sierra, but I'm getting an error instead.

Trace:

$ curl -o /Users/vagrant/MacPorts-2.4.2-10.13-HighSierra.pkg https://github.com/macports/macports-base/releases/download/v2.4.2/MacPorts-2.4.2-10.13-HighSierra.pkg
$ sudo installer -verbose -pkg /Users/vagrant/MacPorts-2.4.2-10.13-HighSierra.pkg -target /
installer: Error the package path specified was invalid: '/Users/vagrant/MacPorts-2.4.2-10.13-HighSierra.pkg'.

Change History (3)

comment:1 Changed 7 years ago by neverpanic (Clemens Lang)

You will have to provide more information that this. Did you check that the download was successful? What's the filesize of the downloaded file? What's its sha256 checksum?

If I download the file, it seems to be parsed just fine:

$> curl -JOL 'https://github.com/macports/macports-base/releases/download/v2.4.2/MacPorts-2.4.2-10.13-HighSierra.pkg'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   625    0   625    0     0    625      0 --:--:-- --:--:-- --:--:--  1379
100 3518k  100 3518k    0     0  1759k      0  0:00:02  0:00:02 --:--:-- 2087k
curl: Saved to filename 'MacPorts-2.4.2-10.13-HighSierra.pkg'
$> installer -pkginfo -pkg MacPorts-2.4.2-10.13-HighSierra.pkg
MacPorts

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

Component: portsbase
Resolution: invalid
Status: newclosed

GitHub redirects the download location. Use the -L flag to curl to tell it to follow that redirect, as Clemens showed.

comment:3 Changed 7 years ago by mcandre (Andrew Pennebaker)

Confirmed, thank you for the tip! I'm now using -L by default in my curl scripts to ensure that any HTTP redirects are followed. MacPorts now works in my Vagrant box!

Note: See TracTickets for help on using tickets.