[tex-live] Error with install: Can't write to '/tmp/MvcGi1mPGs/i97SMsuejQ/pgfplots.doc.tar.xz': No space left on device at /usr/share/perl5/vendor_perl/LWP/Protocol.pm line

James Ray jcray at protonmail.com
Sat Feb 16 06:28:37 CET 2019

Hi all,

I have tried to run the `.install-tl` script twice after extracting http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz today. However, I get this error in the subject line:
Installing [2567/3746, time/total: 01:33:08/02:18:01]: pgfplots [15151k]
Can't write to '/tmp/MvcGi1mPGs/i97SMsuejQ/pgfplots.doc.tar.xz': No space left on device at /usr/share/perl5/vendor_perl/LWP/Protocol.pm line
[jray at jr-dl install-tl-20190215]$
cat /usr/share/perl5/vendor_perl/LWP/Protocol.pm
package LWP::Protocol;

use base 'LWP::MemberMixin';

our $VERSION = '6.36';

use strict;
use Carp ();
use HTTP::Status ();
use HTTP::Response ();
use Try::Tiny qw(try catch);

my %ImplementedBy = (); # scheme => classname

sub new
    my($class, $scheme, $ua) = @_;

    my $self = bless {
scheme => $scheme,
ua => $ua,

# historical/redundant
        max_size => $ua->{max_size},
    }, $class;


sub create
    my($scheme, $ua) = @_;
    my $impclass = LWP::Protocol::implementor($scheme) or
Carp::croak("Protocol scheme '$scheme' is not supported");

    # hand-off to scheme specific implementation sub-class
    my $protocol = $impclass->new($scheme, $ua);

    return $protocol;

sub implementor
    my($scheme, $impclass) = @_;

    if ($impclass) {
$ImplementedBy{$scheme} = $impclass;
    my $ic = $ImplementedBy{$scheme};
    return $ic if $ic;

    return '' unless $scheme =~ /^([.+\-\w]+)$/;  # check valid URL schemes
    $scheme = $1; # untaint
    $scheme =~ tr/.+-/_/;  # make it a legal module name

    # scheme not yet known, look for a 'use'd implementation
    $ic = "LWP::Protocol::$scheme";  # default location
    $ic = "LWP::Protocol::nntp" if $scheme eq 'news'; #XXX ugly hack
    no strict 'refs';
    # check we actually have one for the scheme:
    unless (@{"${ic}::ISA"}) {
        # try to autoload it
        try {
            (my $class = $ic) =~ s{::}{/}g;
            $class .= '.pm' unless $class =~ /\.pm$/;
            require $class;
        catch {
            my $error = $_;
            if ($error =~ /Can't locate/) {
                $ic = '';
            else {
                die "$error\n";
    $ImplementedBy{$scheme} = $ic if $ic;

sub request
    my($self, $request, $proxy, $arg, $size, $timeout) = @_;
    Carp::croak('LWP::Protocol::request() needs to be overridden in subclasses');

# legacy
sub timeout    { shift->_elem('timeout',    @_); }
sub max_size   { shift->_elem('max_size',   @_); }

sub collect
    my ($self, $arg, $response, $collector) = @_;
    my $content;
    my($ua, $max_size) = @{$self}{qw(ua max_size)};

    # This can't be moved to Try::Tiny due to the closures within causing
    # leaks on any version of Perl prior to 5.18.
    # https://perl5.git.perl.org/perl.git/commitdiff/a0d2bbd5c
    my $error = do { #catch
        local $@;
        local $\; # protect the print below from surprises
        eval { # try
            if (!defined($arg) || !$response->is_success) {
                $response->{default_add_content} = 1;
            elsif (!ref($arg) && length($arg)) {
                open(my $fh, ">", $arg) or die "Can't write to '$arg': $!";
                push(@{$response->{handlers}{response_data}}, {
                    callback => sub {
                        print $fh $_[3] or die "Can't write to '$arg': $!";
                push(@{$response->{handlers}{response_done}}, {
                    callback => sub {
                        close($fh) or die "Can't write to '$arg': $!";
            elsif (ref($arg) eq 'CODE') {
                push(@{$response->{handlers}{response_data}}, {
                    callback => sub {
                        &$arg($_[3], $_[0], $self);
            else {
                die "Unexpected collect argument '$arg'";

            $ua->run_handlers("response_header", $response);

            if (delete $response->{default_add_content}) {
                push(@{$response->{handlers}{response_data}}, {
                    callback => sub {

            my $content_size = 0;
            my $length = $response->content_length;
            my %skip_h;

            while ($content = &$collector, length $$content) {
                for my $h ($ua->handlers("response_data", $response)) {
                    next if $skip_h{$h};
                    unless ($h->{callback}->($response, $ua, $h, $$content)) {
                        # XXX remove from $response->{handlers}{response_data} if present
                $content_size += length($$content);
                $ua->progress(($length ? ($content_size / $length) : "tick"), $response);
                if (defined($max_size) && $content_size > $max_size) {
                    $response->push_header("Client-Aborted", "max_size");

    if ($error) {
        $response->push_header('X-Died' => $error);
        $response->push_header("Client-Aborted", "die");
    delete $response->{handlers}{response_data};
    delete $response->{handlers} unless %{$response->{handlers}};
    return $response;

sub collect_once
    my($self, $arg, $response) = @_;
    my $content = \ $_[3];
    my $first = 1;
    $self->collect($arg, $response, sub {
return $content if $first--;
return \ "";




=head1 NAME

LWP::Protocol - Base class for LWP protocols


package LWP::Protocol::foo;
use base qw(LWP::Protocol);


This class is used as the base class for all protocol implementations
supported by the LWP library.

When creating an instance of this class using
C<LWP::Protocol::create($url)>, and you get an initialized subclass
appropriate for that access method. In other words, the
L<LWP::Protocol/create> function calls the constructor for one of its

All derived C<LWP::Protocol> classes need to override the request()
method which is used to service a request. The overridden method can
make use of the collect() function to collect together chunks of data
as it is received.

=head1 METHODS

The following methods and functions are provided:

=head2 new

    my $prot = LWP::Protocol->new();

The LWP::Protocol constructor is inherited by subclasses. As this is a
virtual base class this method should B<not> be called directly.

=head2 create

    my $prot = LWP::Protocol::create($scheme)

Create an object of the class implementing the protocol to handle the
given scheme. This is a function, not a method. It is more an object
factory than a constructor. This is the function user agents should
use to access protocols.

=head2 implementor

    my $class = LWP::Protocol::implementor($scheme, [$class])

Get and/or set implementor class for a scheme.  Returns C<''> if the
specified scheme is not supported.

=head2 request

    $response = $protocol->request($request, $proxy, undef);
    $response = $protocol->request($request, $proxy, '/tmp/sss');
    $response = $protocol->request($request, $proxy, \&callback, 1024);

Dispatches a request over the protocol, and returns a response
object. This method needs to be overridden in subclasses.  Refer to
L<LWP::UserAgent> for description of the arguments.

=head2 collect

    my $res = $prot->collect(undef, $response, $collector); # stored in $response
    my $res = $prot->collect($filename, $response, $collector);
    my $res = $prot->collect(sub { ... }, $response, $collector);

Collect the content of a request, and process it appropriately into a scalar,
file, or by calling a callback. If the first parameter is undefined, then the
content is stored within the C<$response>. If it's a simple scalar, then it's
interpreted as a file name and the content is written to this file.  If it's a
code reference, then content is passed to this routine.

The collector is a routine that will be called and which is
responsible for returning pieces (as ref to scalar) of the content to
process.  The C<$collector> signals C<EOF> by returning a reference to an
empty string.

The return value is the L<HTTP::Response> object reference.

B<Note:> We will only use the callback or file argument if
C<< $response->is_success() >>.  This avoids sending content data for
redirects and authentication responses to the callback which would be

=head2 collect_once

    $prot->collect_once($arg, $response, $content)

Can be called when the whole response content is available as content. This
will invoke L<LWP::Protocol/collect> with a collector callback that
returns a reference to C<$content> the first time and an empty string the

=head1 SEE ALSO

Inspect the F<LWP/Protocol/file.pm> and F<LWP/Protocol/http.pm> files
for examples of usage.


Copyright 1995-2001 Gisle Aas.

This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

[jray at jr-dl install-tl-20190215]$ lsblk -f
NAME   FSTYPE LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINT
├─sda1 vfat             7D57-B7BC                             299.1M     0% /boot/efi
├─sda2 ext4             8ad88713-bc2e-4bfb-af80-c0f7e0f5e91c  250.8G     7% /
└─sda3 swap             86ea7831-1a63-4a74-9286-f8741ef4ce8c                [SWAP]
├─sdb1 ext4   SG_data   52776559-1302-4aa3-92b8-987d2d3d9a9c  461.9G    21% /home
└─sdb2 ext4   SG_backup a9eb34d2-615f-4113-ab93-b60ac2192a8d  228.4G    17% /media/sg_backup
[jray at jr-dl install-tl-20190215]$ inxi -Fxz
System:    Host: jr-dl Kernel: 4.20.7-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: N/A Distro: Manjaro Linux
Machine:   Type: Laptop System: Dell product: Latitude E6410 v: 0001 serial: <filter>
           Mobo: Dell model: 0HNGW4 serial: <filter> UEFI: Dell v: A16 date: 12/05/2013
Battery:   ID-1: BAT0 charge: 39.6 Wh condition: 39.6/48.8 Wh (81%) model: Samsung SDI DELL PT43699 status: Full
CPU:       Topology: Dual Core model: Intel Core i5 M 560 bits: 64 type: MT MCP arch: Nehalem rev: 5 L2 cache: 3072 KiB
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21290
           Speed: 1444 MHz min/max: 1199/2667 MHz Core speeds (MHz): 1: 1230 2: 1253 3: 1278 4: 1445
Graphics:  Device-1: Intel Core Processor Integrated Graphics vendor: Dell Latitude E6410 driver: i915 v: kernel
           bus ID: 00:02.0
           Display: x11 server: X.Org 1.20.3 driver: intel unloaded: modesetting resolution: 1440x900~60Hz, 1920x1080~60Hz
           OpenGL: renderer: Mesa DRI Intel Ironlake Mobile v: 2.1 Mesa 18.3.2 direct render: Yes
Audio:     Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Dell Latitude E6410 driver: snd_hda_intel
           v: kernel bus ID: 00:1b.0
           Sound Server: ALSA v: k4.20.7-1-MANJARO
Network:   Device-1: Intel 82577LM Gigabit Network vendor: Dell Latitude E6410 driver: e1000e v: 3.2.6-k port: 7040
           bus ID: 00:19.0
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
           Device-2: Broadcom and subsidiaries BCM43224 802.11a/b/g/n vendor: Dell Wireless 1520 Half-size Mini PCIe Card
           driver: wl v: kernel port: 7000 bus ID: 02:00.0
           IF: wlp2s0 state: down mac: <filter>
Drives:    Local Storage: total: 1.20 TiB used: 197.53 GiB (16.1%)
           ID-1: /dev/sda vendor: Seagate model: ST9320423AS size: 298.09 GiB
           ID-2: /dev/sdb type: USB vendor: Seagate model: Expansion size: 931.51 GiB
Partition: ID-1: / size: 284.06 GiB used: 18.79 GiB (6.6%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 622.48 GiB used: 128.93 GiB (20.7%) fs: ext4 dev: /dev/sdb1
           ID-3: swap-1 size: 8.18 GiB used: 728.2 MiB (8.7%) fs: swap dev: /dev/sda3
Sensors:   System Temperatures: cpu: 48.0 C mobo: N/A sodimm: 45.0 C
           Fan Speeds (RPM): cpu: 3321
Info:      Processes: 208 Uptime: 5h 00m Memory: 3.72 GiB used: 2.10 GiB (56.5%) Init: systemd Compilers: gcc: 8.2.1
           clang: 7.0.1 Shell: bash v: 5.0.0 inxi: 3.0.30
[jray at jr-dl install-tl-20190215]$

I checked the known issues and bugs page but couldn't see anything relevant to this issue.

Kind regards,

James Ray

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-live/attachments/20190216/ca68ec6e/attachment-0001.html>

More information about the tex-live mailing list