[SOLVED] Dartlang and Flutter package install problems

When using pub or flutter to install libraries it fails with errors like this:

$ flutter packages get
gzip: warning: <stdin>: trailing junk was ignored                       
gzip: warning: <stdin>: trailing junk was ignored                       
tar: Child returned status 1                                            
tar: Error is not recoverable: exiting now                              
tar: Child returned status 1                                            
tar: Error is not recoverable: exiting now                              
gzip: warning: <stdin>: trailing junk was ignored                       
tar: Child returned status 1                                            
tar: Error is not recoverable: exiting now                              
gzip: warning: <stdin>: trailing junk was ignored                       
tar: Child returned status 1                                            
tar: Error is not recoverable: exiting now                              
gzip: warning: <stdin>: trailing junk was ignored                       
tar: Child returned status 1                                            
tar: Error is not recoverable: exiting now         

In Clear Linux pigz is installed and it wraps gzip and gunzip.

The flutter and pub tools require the streaming functionality that real gunzip provides.

To resolve I installed brew for linux. Then ran brew install gzip and then make sure the brew path is preferred in my $PATH.

and does it work now ?

Yes, pub was able to install stagehand and the webdev server.

All good!

1 Like

I will add that the initial ‘compilation’ of the stagehand
AngularDart app with webdev on Windows 10 took 2 minutes 40 seconds and on Clear Linux it took 2 minutes 4 seconds on this Core m3 laptop. The whole development cycle is much quicker.