MyBB Community Forums

Full Version: cURL / wget fails - not a zip file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I just tried installing MyBB via the installation page.

The first command is always failing, even on my local machine, it downloads a 178 byte corrupt zip file.


wget --content-disposition https://www.mybb.com/download/latest -O mybb.zip

I have also tried without the www as it redirects anyway, but same result


Archive:  mybb.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of mybb.zip or
        mybb.zip.zip, and cannot find mybb.zip.ZIP, period.


Downloading it manually via visiting the link does indeed work.

Any suggestions on a fix? I tried both cURL and wget with no success


root@website:/var/www/website/forums# wget --content-disposition https://www.mybb.com/download/latest -O mybb.zip
--2019-05-28 14:55:49--  https://www.mybb.com/download/latest
Resolving www.mybb.com (www.mybb.com)... 104.25.196.102, 104.25.195.102, 2606:4700:20::6819:c366, ...
Connecting to www.mybb.com (www.mybb.com)|104.25.196.102|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://mybb.com/download/latest [following]
--2019-05-28 14:55:49--  https://mybb.com/download/latest
Resolving mybb.com (mybb.com)... 104.25.196.102, 104.25.195.102, 2606:4700:20::6819:c466, ...
Connecting to mybb.com (mybb.com)|104.25.196.102|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://mybb.com/download/latest/ [following]
URL transformed to HTTPS due to an HSTS policy
--2019-05-28 14:55:50--  https://mybb.com/download/latest/
Reusing existing connection to mybb.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘mybb.zip’

mybb.zip                                                [ <=>                                                                                                             ]     503  --.-KB/s    in 0s      

2019-05-28 14:55:50 (34.5 MB/s) - ‘mybb.zip’ saved [503]

Host is Hetzner, not sure if that makes a difference?

I have also tried this from my desktop - running Ubuntu and have the same issue.

EDIT: Manually finding the download link seemed to work


wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip
(2019-05-28, 01:02 PM)Exze Wrote: [ -> ]Hi,

I just tried installing MyBB via the installation page.

The first command is always failing, even on my local machine, it downloads a 178 byte corrupt zip file.

wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip

You are supposed to UNCOMPRESS the MyBB.zip file first before going any further.

Follow the instructions located HERE.
(2019-05-28, 01:34 PM)Serpius Wrote: [ -> ]
(2019-05-28, 01:02 PM)Exze Wrote: [ -> ]Hi,

I just tried installing MyBB via the installation page.

The first command is always failing, even on my local machine, it downloads a 178 byte corrupt zip file.

wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip

You are supposed to UNCOMPRESS the MyBB.zip file first before going any further.

Follow the instructions located HERE.

Ermmm, no. You need to first download the zip before uncompressing.... Otherwise nothing to uncompress. Feel free to read the guide you sent me first and also read the thread about how I ALREADY READ IT....
the https://www.mybb.com/download/latest link is not a symlink but a http redirection on another subdomain, wget dislike it.
(2019-05-28, 01:35 PM)Exze Wrote: [ -> ]
(2019-05-28, 01:34 PM)Serpius Wrote: [ -> ]
(2019-05-28, 01:02 PM)Exze Wrote: [ -> ]Hi,

I just tried installing MyBB via the installation page.

The first command is always failing, even on my local machine, it downloads a 178 byte corrupt zip file.

wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip

You are supposed to UNCOMPRESS the MyBB.zip file first before going any further.

Follow the instructions located HERE.

Ermmm, no. You need to first download the zip before uncompressing.... Otherwise nothing to uncompress. Feel free to read the guide you sent me first and also read the thread about how I ALREADY READ IT....

If you want to be caustic about this, that's fine. 

Good luck on figuring this out.
(2019-05-28, 02:25 PM)Serpius Wrote: [ -> ]
(2019-05-28, 01:35 PM)Exze Wrote: [ -> ]
(2019-05-28, 01:34 PM)Serpius Wrote: [ -> ]
(2019-05-28, 01:02 PM)Exze Wrote: [ -> ]Hi,

I just tried installing MyBB via the installation page.

The first command is always failing, even on my local machine, it downloads a 178 byte corrupt zip file.

wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip

You are supposed to UNCOMPRESS the MyBB.zip file first before going any further.

Follow the instructions located HERE.

Ermmm, no. You need to first download the zip before uncompressing.... Otherwise nothing to uncompress. Feel free to read the guide you sent me first and also read the thread about how I ALREADY READ IT....

If you want to be caustic about this, that's fine. 

Good luck on figuring this out.

I mean, you gave me advice that clearly wouldn't work... Then proceed to tell me something that i already clearly stated I had done in the thread...

If you're going to give advice, at least read and comprehend the thread first before jumping on "Oh read the docs"
(2019-05-28, 02:25 PM)Serpius Wrote: [ -> ]If you want to be caustic about this, that's fine. 

If downloading the zip fails, you can't uncompress it. Ergo, you need to download the zip first. Using wget. Which is what OP is asking about.

OP: You'll want to wget this file instead, straight from the source:

https://github.com/mybb/mybb/releases/download/mybb_1820/build_1820.zip

For anyone else who needs to wget a file, the releases are on Github here: https://github.com/mybb/mybb/releases - I make no guarantee about running old versions, etc etc.
(2019-05-29, 01:46 AM)Ben Cousins Wrote: [ -> ]
(2019-05-28, 02:25 PM)Serpius Wrote: [ -> ]If you want to be caustic about this, that's fine. 

If downloading the zip fails, you can't uncompress it. Ergo, you need to download the zip first. Using wget. Which is what OP is asking about.

OP: You'll want to wget this file instead, straight from the source:

https://github.com/mybb/mybb/releases/download/mybb_1820/build_1820.zip

For anyone else who needs to wget a file, the releases are on Github here: https://github.com/mybb/mybb/releases - I make no guarantee about running old versions, etc etc.

Here's the problem... he was attempting to download a zipped file at a location that did not exist. 

wget --content-disposition https://resources.mybb.com/downloads/mybb_1820.zip -O mybb.zip

Crazycat is correct in his post in this thread. 

Regardless, it would have been far easier to download mybb_1820.zip manually, uncompress it, upload it via FTP, then do the install from one of the pre-installed Linux browsers - Firefox or Chrome. 

The amount of time he has posted in this thread, he would have gotten the website up and running, but no... he decides to do things the hard way.

Why make things more difficult for oneself when it's not necessary?
(2019-05-29, 04:38 AM)Serpius Wrote: [ -> ]Regardless, it would have been far easier to download mybb_1820.zip manually, uncompress it, upload it via FTP, then do the install from one of the pre-installed Linux browsers - Firefox or Chrome. 

You're completely deluded; the amount of time it takes to download, uncompress, and then wait for FTP to upload a full package is tonnes longer than just wget, unzip, sudo mv * /var/www/html and then going for the install.

I mean, sure, if you use Shared Hosting you have literally no choice, but seriously, if you can, wget is multitudes faster. It also does not require one to download a piece of software to do it. Powershell now does ssh natively.

Ergo, no, it would not "have been faster" to download, uncompress and re-upload. The issue was a file was not in the place it was meant to be, not that the OP had NFI what they were doing.
(2019-05-29, 06:18 AM)Ben Cousins Wrote: [ -> ]
(2019-05-29, 04:38 AM)Serpius Wrote: [ -> ]Regardless, it would have been far easier to download mybb_1820.zip manually, uncompress it, upload it via FTP, then do the install from one of the pre-installed Linux browsers - Firefox or Chrome. 

You're completely deluded; the amount of time it takes to download, uncompress, and then wait for FTP to upload a full package is tonnes longer than just wget, unzip, sudo mv * /var/www/html and then going for the install.

I mean, sure, if you use Shared Hosting you have literally no choice, but seriously, if you can, wget is multitudes faster. It also does not require one to download a piece of software to do it. Powershell now does ssh natively.

Ergo, no, it would not "have been faster" to download, uncompress and re-upload. The issue was a file was not in the place it was meant to be, not that the OP had NFI what they were doing.

I won't further this debate as the last few posts have begun to sidetrack the origin of the thread.