WSL: Errors galore during apt-get dist-upgrade

I’m trying to get a working PHP 7.1 / NGINX stack set up on Ubuntu on Windows.

Is that possible, or am I out too soon with the status of the current beta?

I’ve gotten as far as a working PHP 7.1 CLI installation, and working SSH daemon, and have been able to run unit-tests etc. and debug with xdebug from my Windows-installation of PHP Storm, and I was pretty excited about that!

I did also manage to get a working NGINX set up, by using the master_process off directive, which I don’t understand what is for, but something to do with IPv6 being not yet fully implemented or something, and this is a work-around of sorts?

I have been unable to run PHP scripts under NGINX, so that’s the key piece missing for me at this time. I’ve gotten as far as to no error-messages showing up in NGINX’s error.log, but all I’ve managed to get it to serve is the default index.html file that comes with NGINX, it won’t serve PHP scripts.

I have all my installation notes here, hoping to eventually succeed and being able to share with others how to get this working.

Following my own instructions, I begin by doing the usual apt-get update, dist-upgrade, upgrade - but during the dist-upgrade, I’m getting a long list of errors - here’s the tail of the output:

Preparing to unpack .../apport_2.14.1-0ubuntu3.23_all.deb ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of stop.
Unpacking apport (2.14.1-0ubuntu3.23) over (2.14.1-0ubuntu3.21) ...
Preparing to unpack .../w3m_0.5.3-15ubuntu0.1_amd64.deb ...
Unpacking w3m (0.5.3-15ubuntu0.1) over (0.5.3-15) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Setting up libgnutls26:amd64 (2.12.23-12ubuntu2.7) ...
Setting up libgnutls-openssl27:amd64 (2.12.23-12ubuntu2.7) ...
Setting up libssl1.0.0:amd64 (1.0.1f-1ubuntu2.22) ...
Setting up libdbus-1-3:amd64 (1.6.18-0ubuntu4.5) ...
Setting up libudev1:amd64 (204-5ubuntu20.24) ...
Setting up udev (204-5ubuntu20.24) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of restart.
Removing 'diversion of /bin/udevadm to /bin/udevadm.upgrade by fake-udev'
update-initramfs: deferring update (trigger activated)
Setting up libkrb5support0:amd64 (1.12+dfsg-2ubuntu5.3) ...
Setting up libk5crypto3:amd64 (1.12+dfsg-2ubuntu5.3) ...
Setting up libkrb5-3:amd64 (1.12+dfsg-2ubuntu5.3) ...
Setting up libgssapi-krb5-2:amd64 (1.12+dfsg-2ubuntu5.3) ...
Setting up libsystemd-daemon0:amd64 (204-5ubuntu20.24) ...
Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.6~14.04.1) ...
Setting up libsystemd-login0:amd64 (204-5ubuntu20.24) ...
Setting up dbus (1.6.18-0ubuntu4.5) ...
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up systemd-services (204-5ubuntu20.24) ...
Setting up libpam-systemd:amd64 (204-5ubuntu20.24) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found.
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.9) ...
Setting up libevent-2.0-5:amd64 (2.0.21-stable-1ubuntu1.14.04.2) ...
Setting up libfreetype6:amd64 (2.5.2-1ubuntu2.6) ...
Setting up libgc1c2:amd64 (1:7.2d-5ubuntu2.1) ...
Setting up libicu52:amd64 (52.1-3ubuntu0.5) ...
Setting up eject (2.1.5+deb1+cvs20081104-13.1ubuntu0.14.04.1) ...
Setting up initramfs-tools-bin (0.103ubuntu4.7) ...
Setting up initramfs-tools (0.103ubuntu4.7) ...
update-initramfs: deferring update (trigger activated)
Setting up makedev (2.3.1-93ubuntu2~ubuntu14.04.1) ...
grep: /proc/1/environ: No such file or directory
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘mem-’: Function not implemented
makedev mem c 1 1 root kmem 0640: failed
mknod: ‘kmem-’: Function not implemented
makedev kmem c 1 2 root kmem 0640: failed
mknod: ‘null-’: Function not implemented
makedev null c 1 3 root root 0666: failed
mknod: ‘port-’: Function not implemented
makedev port c 1 4 root kmem 0640: failed
mknod: ‘zero-’: Function not implemented
makedev zero c 1 5 root root 0666: failed
mknod: ‘full-’: Function not implemented
makedev full c 1 7 root root 0666: failed
mknod: ‘random-’: Function not implemented
makedev random c 1 8 root root 0666: failed
mknod: ‘urandom-’: Function not implemented
makedev urandom c 1 9 root root 0666: failed
mknod: ‘tty-’: Function not implemented
makedev tty c 5 0 root tty 0666: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘ram0-’: Function not implemented
makedev ram0 b 1 0 root disk 0660: failed
mknod: ‘ram1-’: Function not implemented
makedev ram1 b 1 1 root disk 0660: failed
mknod: ‘ram2-’: Function not implemented
makedev ram2 b 1 2 root disk 0660: failed
mknod: ‘ram3-’: Function not implemented
makedev ram3 b 1 3 root disk 0660: failed
mknod: ‘ram4-’: Function not implemented
makedev ram4 b 1 4 root disk 0660: failed
mknod: ‘ram5-’: Function not implemented
makedev ram5 b 1 5 root disk 0660: failed
mknod: ‘ram6-’: Function not implemented
makedev ram6 b 1 6 root disk 0660: failed
mknod: ‘ram7-’: Function not implemented
makedev ram7 b 1 7 root disk 0660: failed
mknod: ‘ram8-’: Function not implemented
makedev ram8 b 1 8 root disk 0660: failed
mknod: ‘ram9-’: Function not implemented
makedev ram9 b 1 9 root disk 0660: failed
mknod: ‘ram10-’: Function not implemented
makedev ram10 b 1 10 root disk 0660: failed
mknod: ‘ram11-’: Function not implemented
makedev ram11 b 1 11 root disk 0660: failed
mknod: ‘ram12-’: Function not implemented
makedev ram12 b 1 12 root disk 0660: failed
mknod: ‘ram13-’: Function not implemented
makedev ram13 b 1 13 root disk 0660: failed
mknod: ‘ram14-’: Function not implemented
makedev ram14 b 1 14 root disk 0660: failed
mknod: ‘ram15-’: Function not implemented
makedev ram15 b 1 15 root disk 0660: failed
mknod: ‘ram16-’: Function not implemented
makedev ram16 b 1 16 root disk 0660: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘loop0-’: Function not implemented
makedev loop0 b 7 0 root disk 0660: failed
mknod: ‘loop1-’: Function not implemented
makedev loop1 b 7 1 root disk 0660: failed
mknod: ‘loop2-’: Function not implemented
makedev loop2 b 7 2 root disk 0660: failed
mknod: ‘loop3-’: Function not implemented
makedev loop3 b 7 3 root disk 0660: failed
mknod: ‘loop4-’: Function not implemented
makedev loop4 b 7 4 root disk 0660: failed
mknod: ‘loop5-’: Function not implemented
makedev loop5 b 7 5 root disk 0660: failed
mknod: ‘loop6-’: Function not implemented
makedev loop6 b 7 6 root disk 0660: failed
mknod: ‘loop7-’: Function not implemented
makedev loop7 b 7 7 root disk 0660: failed
mknod: ‘tty0-’: Function not implemented
makedev tty0 c 4 0 root tty 0600: failed
mknod: ‘console-’: Function not implemented
makedev console c 5 1 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty2-’: Function not implemented
makedev tty2 c 4 2 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty3-’: Function not implemented
makedev tty3 c 4 3 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty4-’: Function not implemented
makedev tty4 c 4 4 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty5-’: Function not implemented
makedev tty5 c 4 5 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty6-’: Function not implemented
makedev tty6 c 4 6 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty7-’: Function not implemented
makedev tty7 c 4 7 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty8-’: Function not implemented
makedev tty8 c 4 8 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘tty9-’: Function not implemented
makedev tty9 c 4 9 root tty 0600: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘mixer-’: Function not implemented
makedev mixer c 14 0 root audio 0660: failed
mknod: ‘mixer1-’: Function not implemented
makedev mixer1 c 14 16 root audio 0660: failed
mknod: ‘mixer2-’: Function not implemented
makedev mixer2 c 14 32 root audio 0660: failed
mknod: ‘mixer3-’: Function not implemented
makedev mixer3 c 14 48 root audio 0660: failed
mknod: ‘sequencer-’: Function not implemented
makedev sequencer c 14 1 root audio 0660: failed
mknod: ‘midi00-’: Function not implemented
makedev midi00 c 14 2 root audio 0660: failed
mknod: ‘midi01-’: Function not implemented
makedev midi01 c 14 18 root audio 0660: failed
mknod: ‘midi02-’: Function not implemented
makedev midi02 c 14 34 root audio 0660: failed
mknod: ‘midi03-’: Function not implemented
makedev midi03 c 14 50 root audio 0660: failed
mknod: ‘dsp-’: Function not implemented
makedev dsp c 14 3 root audio 0660: failed
mknod: ‘dsp1-’: Function not implemented
makedev dsp1 c 14 19 root audio 0660: failed
mknod: ‘dsp2-’: Function not implemented
makedev dsp2 c 14 35 root audio 0660: failed
mknod: ‘dsp3-’: Function not implemented
makedev dsp3 c 14 51 root audio 0660: failed
mknod: ‘audio-’: Function not implemented
makedev audio c 14 4 root audio 0660: failed
mknod: ‘audio1-’: Function not implemented
makedev audio1 c 14 20 root audio 0660: failed
mknod: ‘audio2-’: Function not implemented
makedev audio2 c 14 36 root audio 0660: failed
mknod: ‘audio3-’: Function not implemented
makedev audio3 c 14 52 root audio 0660: failed
mknod: ‘sndstat-’: Function not implemented
makedev sndstat c 14 6 root audio 0660: failed
mknod: ‘audioctl-’: Function not implemented
makedev audioctl c 14 7 root audio 0660: failed
mknod: ‘mpu401data-’: Function not implemented
makedev mpu401data c 31 0 root audio 0660: failed
mknod: ‘mpu401stat-’: Function not implemented
makedev mpu401stat c 31 1 root audio 0660: failed
mknod: ‘midi0-’: Function not implemented
makedev midi0 c 35 0 root audio 0660: failed
mknod: ‘rmidi0-’: Function not implemented
makedev rmidi0 c 35 64 root audio 0660: failed
mknod: ‘smpte0-’: Function not implemented
makedev smpte0 c 35 128 root audio 0660: failed
mknod: ‘midi1-’: Function not implemented
makedev midi1 c 35 1 root audio 0660: failed
mknod: ‘rmidi1-’: Function not implemented
makedev rmidi1 c 35 65 root audio 0660: failed
mknod: ‘smpte1-’: Function not implemented
makedev smpte1 c 35 129 root audio 0660: failed
mknod: ‘midi2-’: Function not implemented
makedev midi2 c 35 2 root audio 0660: failed
mknod: ‘rmidi2-’: Function not implemented
makedev rmidi2 c 35 66 root audio 0660: failed
mknod: ‘smpte2-’: Function not implemented
makedev smpte2 c 35 130 root audio 0660: failed
mknod: ‘midi3-’: Function not implemented
makedev midi3 c 35 3 root audio 0660: failed
mknod: ‘rmidi3-’: Function not implemented
makedev rmidi3 c 35 67 root audio 0660: failed
mknod: ‘smpte3-’: Function not implemented
makedev smpte3 c 35 131 root audio 0660: failed
/sbin/MAKEDEV: warning: can't read /proc/devices
mknod: ‘agpgart-’: Function not implemented
makedev agpgart c 10 175 root video 0660: failed
Setting up libapparmor-perl (2.10.95-0ubuntu2.6~14.04.1) ...
Setting up apparmor (2.10.95-0ubuntu2.6~14.04.1) ...
Installing new version of config file /etc/init.d/apparmor ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of reload.
Setting up libisc95 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up libdns100 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up libisccc90 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up libisccfg90 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up libbind9-90 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up liblwres90 (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up bind9-host (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up dnsutils (1:9.9.5.dfsg-3ubuntu0.13) ...
Setting up krb5-locales (1.12+dfsg-2ubuntu5.3) ...
Setting up openssl (1.0.1f-1ubuntu2.22) ...
Setting up tcpdump (4.9.0-1ubuntu1~ubuntu14.04.1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.tcpdump ...
Setting up python3-problem-report (2.14.1-0ubuntu3.23) ...
Setting up python3-apport (2.14.1-0ubuntu3.23) ...
Setting up apport (2.14.1-0ubuntu3.23) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Setting up w3m (0.5.3-15ubuntu0.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
Processing triggers for initramfs-tools (0.103ubuntu4.7) ...
Processing triggers for ureadahead (0.100.0-16) ...

Specifically, I’m concerned about the following messages:

  • mknod: ‘ram0-’: Function not implemented makedev ram0 b 1 0 root disk 0660: failed etc.
  • runlevel:/var/run/utmp: No such file or directory
  • /sbin/MAKEDEV: warning: can't read /proc/devices
  • invoke-rc.d: policy-rc.d denied execution of start
  • /com/ubuntu/upstart: Connection refused

Is any of this “serious”? Could any of it explain why I can’t seem to get NGINX to play nice with FPM?

I’m not a Linux dude, I’m a Windows user, so this is pretty adventurous for me - don’t expect me to understand very technical descriptions of any details, but please let me know if you have any ideas or clues on how to get past this last speedbump to a working installation?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 27 (8 by maintainers)

Most upvoted comments

My solution nginx + php-fpm:

Windows version: 1703 (15063.138) Linux version: Ubuntu 16.04

folders (user: www-data, group: www-data):

/var/http/
/var/http/tmp/
/var/http/logs/
/var/http/sessions/
/var/http/www/
/var/http/www/site.loc/ (site.loc is symlink to windows folder /mnt/c/web/site.loc)

sudo apt remove nginx install nginx from http://nginx.org/en/linux_packages.html (Pre-Built Packages for Stable version / For Ubuntu) (now version 1.12.0) sudo apt install php7.0 (or 7.1) …, php7.0-fpm, …

/etc/nginx/nginx.conf

user www-data;
worker_processes auto;
master_process off;
pid /run/nginx.pid;

...

http {
    ...
    fastcgi_buffering off;
    ...
}

/etc/nginx/site-enabled/site.loc

server {
    server_name site.loc;
    listen 127.0.0.1:80;

    charset UTF-8;
    index index.php;

    disable_symlinks if_not_owner from=$root_path;

    error_log /var/http/logs/site.loc.error.log notice;
    access_log off;

    set $root_path /var/http/www/site.loc;
    root $root_path;

    client_body_temp_path /var/http/tmp;

    location ~ \.php$ {
        .......
        fastcgi_index index.php;
        fastcgi_pass unix:///var/http/tmp/site.loc.sock;

       #include fastcgi_params;
        include fastcgi.conf;
        #"fastcgi_params vs fastcgi.conf" see https://blog.martinfjordvald.com/2013/04/nginx-config-history-fastcgi_params-versus-fastcgi-conf/
    }

    ........
}

/etc/php/7.0/fpm/pool.d/site.loc

[site.loc]
pm = dynamic
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_children = 5
pm.max_spare_servers = 5
listen = /var/http/tmp/site.loc.sock
;listen = 9003
;listen.allowed_clients = 127.0.0.1
listen.mode = 0660
listen.owner = www-data
listen.group = www-data
user = www-data
group = www-data
chdir = /var/http/www/site.loc

php_flag[display_errors] = on
php_admin_value[post_max_size] = 64M
php_admin_value[upload_max_filesize] = 64M

php_admin_value[display_errors] = stderr
php_admin_value[log_errors] = On
php_admin_value[upload_tmp_dir] = /var/http/tmp
php_admin_value[session.save_path] = /var/http/sessions

sudo service nginx restart sudo service php7.0-fpm restart

socket working.

@mindplay-dk it’s not true though. Sockets are implemented but not all socket options and modes are implemented.

Or does everything live and die with the bash window at the moment?

Pretty much.Latest dupe on that topic: https://github.com/Microsoft/BashOnWindows/issues/1849