Monday, November 14, 2016

Upgraded to the macOS Sierra. React Native Packager seems to fail

2016-11-14 22:21 node[488] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-11-14 22:21 node[488] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-11-14 22:21 node[488] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-11-14 22:21 node[488] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-11-14 22:21 node[488] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
 ERROR  Error watching file for changes: EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"Error watching file for changes:","filename":null}
Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1026:11)
   at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

SImple way to solve it is  : 

$ cd /
$ cd usr/local/var/run/watchman/
$ ls
<user>-state
MacBook-Pro:watchman user$ rm -rf <user>-state/

If not then, 

1. increase max file limit

# check open file limit
sysctl kern.maxfiles

# edit sysctl
sudo vim /etc/sysctl.conf

# add these two lines
kern.maxfiles=10485760
kern.maxfilesperproc=1048576

# reboot
sudo reboot

# check new file limit
sysctl kern.maxfiles

2. upgrade to watchman 4.6

# clone repo
git clone https://github.com/facebook/watchman.git

# change to master branch
git checkout -b v4.6.0 v4.6.0

# run compiler
./autogen.sh
./configure --enable-lenient --without-pcre --with-python
make
sudo make install

# check watchman version
watchman -v

# result should be 4.6.0

Do not forget to reboot the computer.

Monday, April 25, 2016

How to install XDM ( xtrem download manager ) for ubuntu ?

To install xtreme download manager in Ubuntu 14.04, please follow these steps

  1. Open a terminal window.
  2. Type in the following commands, then hit Enter after each:

    sudo add-apt-repository ppa:noobslab/apps        
    sudo apt-get update        
    sudo apt-get install xdman 
Or you can download and install it: 

Linux 32 bit TAR+XZ archive (12 MB)
Linux 64 bit TAR+XZ archive (14 MB)



Install java and set path for java in ubuntu

First install java: 

Using a PPA

You can use WebUpd8 PPA (this will download the required files from Oracle and install JDK 8):

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
 
 
 
 
 

Set the path: 

 step 1: Type in the terminal

sudo gedit /etc/environment
 
 step 2: Then add these lines

JAVA_HOME=/usr/lib/jvm/java-8-oracle
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
 
Then save the file.

To check, have you installed or not:
Goto terminal and type following commands:

java -version 

You will see: 

 
 
Then you are done.

Ubuntu apt-get installation problem or Unable to lock the administration directory (/var/lib/dpkg/) is another process using it