Linux, Web Development

Making npm work on a Cifs/Windows Share

I spent the last 5 hours trying to work out why I couldn’t use npm install for bootstrap in a cifs partition.

Turns out some has had this problem and posted a fix: http://askubuntu.com/questions/269727/npm-errors-when-installing-packages-on-windows-share

npm install --no-bin-links

This is since on a cifs partition npm will actually bail out with chmod when trying to set symlinks for the modules that it cannot due to you using a Windows share.

Linux

/etc/network/if-up.d/upstart: 38: cannot create /run/network/ifup.eth0: Directory nonexistent run-parts: /etc/network/if-up.d/upstart exited with return code 2 …done.

I got this error today after an upgrade and google searched a lot. Turns out some one had encountered this error and had got the perfect fix: Nemethge’s Blog

I am not sure exactly why this works but it seems like just symlinking your /var/run with your /run seems to do the trick. Anyway you have him to thank for coming up with this solution. I can safely say it works (just tried it now). I have quoted the solution below just incase of deadlinks etc:

Note: This also solved the problem of my network settings not being found and Ubuntu waiting 60 secs before loading. So if your getting this problem then it could be related to the solution below however I have the same network problem on another network and that install of Ubuntu can find its network at startup despite the error message (can login remotely without having to restart the network for one). So this solution may not solve every case you get the network error message but it will in some cases.

It seems the move from /var/run to /run did not work during the upgrade process.

I fixed with this:

cd /var
mv run _run
ln -s /run .

Linux

E: Could not perform immediate configuration on ‘util-linux’.Please see man 5 apt

I stole this from the Ubuntu forums (haven’t got link anymore since I just pasted it here very quickly for reference):

I ran into this problem myself, and I’ve seen that others have had the same problem when updating from Karmic to Lucid via apt-get. There is a bug in apt for Lucid, and it has been noted on one of the Ubuntu lists (sorry, I lost the link.)

This is a simple how-to and a work-around to the upgrading with apt-get:

1) Update your sources.list file to replace all instances of ‘karmic” to ‘lucid’ :

$ sudo sed -i ‘s/karmic/lucid/g’ /etc/apt/sources.list

2) Run apt-get update:

$ sudo apt-get update

3) Run a regular upgrade;

$ sudo apt-get upgrade -y

Here is where the problem comes in. Apt is looking for the util-linux package, which is part of upstart-job, but someone apparenlty forgot to write the code to tell apt-about this (whoops!)

So, you now need to install upstart-job by itself. By skipping this step you will get the error message when you try to run step 5: “E: Could not perform immediate configuration on ‘util-linux’.Please see man 5 apt”

4) $ sudo apt-get install upstart-job

5) Now you can run apt-get dist-upgrade:

$ sudo apt-get dist-upgrade -y

Hope this helps out anyone who got stuck.

Linux, Windows

Cifs cannot allocate memory (-12) producing Windows Srv Error 2017 ((12)Cannot allocate memory: file permissions deny server access:)

Note:

This problem can sometimes be resolved with restarting the srv process in Windows, you may need to restart the virtual machines own network as well. You can restart Windows’ srv process with:

net restart srv

After this you can either try and remount or a restart of the virtual machine to see if that solves your problem.

If this does not solve your problem then another blogger found a method for the more stubborn of computers here: Windows 7 Nonpaged Pool Srv Error 2017

Below is the quotation of the solution from the article. Please note that HKLM actually means HKEY_LOCAL_MACHINE.

Set the following registry key to ’1′:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

and set the following registry key to ’3′:

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

After making these changes and restarting, I haven’t seen this issue arise again. Fixed!

Linux

How to change Window Control positions in Ubuntu 10.04

So I finally got the time to download Ubuntu 10.04 only to find that when I downloaded it my window controls shifted from the right to the left…why, why did the Ubuntu team do that? Making Linux look like a Mac ain’t a good thing and I would like to think the most heated debate on the Ubuntu forums right now is: “WHY THE FUCK HAVE YOU COPIED THAT SHITTY MAC OS?”.

But anyway a deep breath and spurt of Googling later I found this:

Free Trader Beowulf – Ubuntu 10.04 – Window Controls

This article, at the bottom, will tell you exactly how to change your Unix back into a Linux :). Enjoy.