Saturday, September 21, 2013

Results with Lubuntu 13.04 updates and upgrades

In the last post, I have detailed how to get apt-get work.  It required a system reboot which is surprising.
 Anyway, after all these updates and upgrades R is still showing  "buffer overflow" problem. This is mind boggling.

What I am going to do now is this:  Try to get updates from Synaptic Manager. If that does not work, then try Lubuntu 12.10 and see whether it works.
Brand new week, brand new morning but my woes with Linux installation continues. I tried all sorts of distros but failed to get a working OS.  Finally it seemed that in my machine, Ubuntu versions 13.04 gives "buffer overrun"  problem. I tried all the variants of 13.04.



First I try to update the Lubuntu 13.04. Yeah, back to it again:

I reinstall cntlm  and try to get it working following the instructions from here:

http://zipizap.wordpress.com/tag/cntlm/

9:28 am:  Done installing cntlm.

What I am doing now is just do this to see whether apt-get works:

sudo  nano /etc/apt/apt.conf  and add the following line:

Acquire::http::Proxy  "http://rushadf:0302@127.0.0.1:3128";

 Now I put the command:
sudo apt-get update

show 0% waiting for headers and just hangs up there
Does not work. So I close the terminal and try again.

It's still not working. Now let's try this:

sudo vi /etc/bash.bashr

Add your proxy server details in the following format

export http_proxy="http://username:password@proxyhost:port/"

export ftp_proxy="http://username:password@proxyhost:port/"

It's still not working.

I close the terminal and try again to see what happens. NO! still not working!

Now I try this:

Some releases sudo is configured in such a way that all environment variables all cleared when running the command. To keep the value for your http_proxy and fix this, you need to edit /etc/sudoers, run:

visudo 

Then find a line that states:

Defaults env_reset

and add this after it: 

Defaults env_keep = "http_proxy ftp_proxy"
  Now try apt-get again. Nah still not working.
Let me have a system reboot and check. After system reboot it is working. So does it seems that it might have worked right after the first step? who knows!
 

Tuesday, September 17, 2013

Building R from Sources in Lubuntu

Whenever I tried to install packages in R I got error  "buffer overflow detected" or something like that. Somebody suggested to build R from sources and it was a real pain run the configure file:

Step 1:
Get the compressed R installer from CRAN, untar to a folder and go to that folder.

Step2:
run ./configure --with-readline=no. It will give error, fortran has to be installed by the following command:

sudo apt-get install fort77

Another error comes up which says:
checking whether mixed C/Fortran code can be run

Then put: 
$ sudo mv /usr/lib/libf2c.so /usr/lib/libf2c.so_backup
$ sudo ln -s /usr/lib/libf2c.a /usr/lib/libf2c.so

Then:

sudo apt-get install libX11-dev
sudo apt-get install libxt-dev

Then :
make 
make install etc.


All About Texlive in Lubuntu


It seems that using


sudo apt-get install texlive

is a bad idea. Rather use the procedure from the following link:
Following is a comprehensive guide for installing texlive in linux:

http://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu


Now, this is very crucial if we want to avoid  recommended packages: this might be good for large doc files such as texlive-extra-doc etc

sudo apt-get --no-install-recommends install lyx


This is how to manually install a particular individual tex-live package:

http://tex.stackexchange.com/questions/38978/how-can-i-manually-install-a-latex-package-debian-ubuntu-linux


Here is how to remove texlive:

sudo apt-get remove texlive
sudo apt-get autoremove
sudo apt-get remove tex-common
Then download and install directly from TUG. You can choose your operating system there. This has a bunch of packages and is much more complete than other distributions. Much better than sudo apt-get install latex.
 
Following code is to dowload it directly:
wget http://mirror.ctan.org/systems/texlive/Images/texlive2012.iso
sudo mount -o loop texlive2012.iso /mnt
cd /mnt
sudo ./install-tl
 
 
Some issues related to installation was discussed here. Specially take note of
sudo apt-get purge command.
 
Here is a great way to find information about latex package:
 



I advise to recur to an installation by hand of a tex package only when such tex package is not available in an ubuntu package.
Searching for it with
apt-file -x search '/textcomp.sty$'
I obtain the following results:
texlive-latex-base: /usr/share/texmf-texlive/tex/latex/base/textcomp.sty
and it say the tex package you look for is contained in the ubuntu package whose name is texlive-latex-base, so install it, if not already installed.
By the way, apt-file is a command to install separately from the apt-get package, and only a convenient and alternative way to search into the repositories the same way ashttp://packages.ubuntu.com/.
 
 

Monday, September 16, 2013

New Day, New Linux Distro and it's Olivia time

Lubuntu is big big disappointment. I really like the feel and look of that distro but ended up with failure of R packages. R is quintissential for my needs, therefore I had to give up. I could not fix the "buffer overflow" problem while installing packages.


Vim in Lubuntu

I installed vim-gnome via Synaptic and I did not seem to find familiar .vim folder which is equivalent to vimfiles in windows. Following two threads helped me out:

http://stackoverflow.com/questions/7640805/vim-ubuntu-system-wide-plugin-directory


http://stackoverflow.com/questions/12962233/vim-7-3-on-ubuntu-12-10-doesnt-have-ftplugin-directory-anywhere

http://vim.wikia.com/wiki/Open_vimrc_file


Specially the second one was really useful:


Just to be clear: upon install, Vim doesn't do anything to your home directory. The ~/.vim directoryand any subdirectory are to be created by the user: it is where you put your config so you are in charge.
endedit
You must create those directories yourself, no matter what OS you are using. On UNIX-like systems (Linux, Mac OS X…) all your stuff is supposed to go into ~/.vim:
$ cd
$ mkdir .vim
$ cd .vim
Some plugins may need to be placed into specific subdirectories:
~/.vim/autoload
~/.vim/plugin
etc.
You can:
  • create those directories just like you created ~/.vim and place all the files manually
  • $ unzip the plugins right there in ~/.vim, the necessary directories are created for you
  • use some plugin manager like Pathogen or VAM or Vundle and/or a VCS…
I'd advise you to start slow. Just install everything manually: it will help you getting more comfortable with the whole thing.
Anyway, since you have already installed a bunch of (useless IMO, except rails) plugins you probably already know all that.
Vim already has the necessary ftplugins, you only need to tell Vim to "activate" them by default. Add these two lines to your ~/.vimrc (create that file if you didn't already):
filetype plugin indent on
syntax on

Manual 'Unproxy' working back at home

In my previous post, I have detailed how proxy works in my Lubuntu system. In this post I am going to  described how I disabled the proxy when I got back home.

Dropbox

Dropbox seems to be the easiest to work with. Just change the preference in the  proxy to no proxy, and it works just fine without any hassle.


Chrome

Chrome which gave me lots of pain, seemed to be working just fine. After doing 

sudo vim /etc/chromium-browser/default


I just commented out the following lines:

export http_proxy="http://rushadf:0302@127.0.01:3128/"


With these, Chrome worked just fine. 



Synaptic and "apt-get"

Typed the following command in the terminal:

sudo vi /etc/bash.bashr

Then commented out the following two lines:

export http_proxy="http://username:password@proxyhost:port/"
export ftp_proxy="http://username:password@proxyhost:port/"


"apt-get" still did not work.


Then I typed the following in the terminal:

sudo vi /etc/apt/apt.conf

Then commented out the following:

Acquire::http::Proxy "http://rushadf:0302@127.0.0.1:3128";

Now, apt-get and synaptic works just fine!