It states in the error message what the problem is;
Warning: /usr/local/include isn't writable
You should probably change the ownership and permissions of /usr/local
back to your user account.
If you run ls -l /usr/local/
you should have an output like this:
total 4
-rw-r--r-- 1 user admin 493 23 Apr 15:14 CONTRIBUTING.md
drwxr-xr-x 17 user admin 578 5 May 14:54 Cellar
drwxr-xr-x 3 user admin 102 23 Apr 16:33 Frameworks
drwxr-xr-x 10 user admin 340 24 Apr 08:50 Library
Where user
is your username and admin
is your group. If you see something more like:
drwxr-xr-x 17 root wheel 578 5 May 14:54 Cellar
you will have to run chown -R user:admin /usr/local
which will change the ownership back to your user.
This should solve the first part. However, be warned, this could stop other software working if you have previously run "sudo make install" software that isn't managed
by Homebrew.
There is also a great answer on How do i fix brew doctor errors that addresses your DYLD_LIBRARY_PATH
issues.