I'm using Ubuntu-14.04
I compiled vim myself (to add support for YouCompleteMe), and now when I execute apt-get dist-upgrade it overwrites my version of vim (and other dependent packages) and causes vim to stop working.
How can I upgrade everything, without ruining what I have compiled myself?
It's generally a good idea to keep things which you've compiled yourself in /usr/local/. Nothing from apt will be installed there so the stuff you've put in the directory will be safe from upgrades.
The other option is to pin the vim package so that the upgrade will not install it (or any dependecies). This might work better if you apt-get source the vim, build the .deb, install it and then pin it rather than just overwriting /usr/bin/vim with your own compile.
Related
According to this article code completion should work for any language with youcompleteme plugin. I set it up as follows in Debian Jessie:
installed vim from repository
installed youcompleteme from repository
issued 'vam install youcompleteme' in cli
After the last step vim start significantly slower, which means that it is loading the plugin. However, completion does not work.
The output of
$ vam status
Name User Status System Status
editexisting removed removed
justify installed removed
matchit removed removed
youcompleteme installed removed
Is there anything else I have to do to get youcompleteme working?
I contacted the maintainer and finally got the missing hint. As it turns out, all I had left to do was to enable filetype recognition.
In case someone else struggles with this, here are some instructions on how to setup Vim with the Debian package vim-youcompleteme.
Install vim and vim-youcompleteme packages
$ sudo apt-get install vim vim-youcompleteme
This will also install any required dependencies automatically. Afterwards you will have to issue the following command
$ vam install youcompleteme
The last command will create ~/.vim folder in your home folder. However, code completion does not work yet. Some further modifications are required. First copy the default ycm_extra_conf.py file to the newly created ~/.vim/ folder
$ cp /usr/share/doc/vim-youcompleteme/examples/ycm_extra_conf.py ~/.vim/.ycm_extra_conf.py
Then we need to tell vim to use this file for code completion in our .vim.rc and to turn on filetype recognition. The following two lines should be added to ~/.vimrc:
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
filetype on
Now vim should be able to use code completion, e.g., with C++ files.
You should follow the installation instructions for YCM, including how to compile it:
Install development tools and CMake: sudo apt-get install
build-essential cmake
Make sure you have Python headers installed: sudo apt-get install
python-dev.
Compiling YCM with semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer
Compiling YCM without semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe ./install.py
Also, I would give you the tip to use vim-plug for handling plugins.
I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I've been told to install specific versions of specific programs, but though I've used apt-get install to install them (having previously done apt-get update) they aren't in the correct version.
The programs that I need are make 4.0 and valgrind 3.10.1.
apt-get installs make 3.81 and valgrind 3.10.0.SVN.
I have tried typing "apt-get install make4.0" and "apt-get install valgrind10.3.1" to no avail. I have downloaded them from the internet and followed what instructions I could understand to install the newer versions but it keeps saying that I have the older ones. (I'm not sure if I can post direct links here, if I can let me know and I'll post where I got them from).
What have I been doing wrong? How can I fix this?
I am currently running Linux Mint.
Thanks for any answer in advance.
Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.
The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.
This has been discussed many times on the GNU Make mailing list and elsewhere.
So to get a newer version, you must compile it from scratch.
This is easy:
Install the required packages (gcc, make and such).
Open up a shell (if you're using the GUI, a terminal window).
Type the following commands (or something equivalent, e.g. you can use curl instead of wget):
cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz
cd make-4.1/
./configure
make
sudo make install
cd ..
rm -rf make-4.1.tar.gz make-4.1
Now, make 4.1 is in /usr/local/bin/make.
You can verify it is there with whereis make.
You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.
Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.
Vim on terminal, Ubuntu 14.04.
While messing with vim syntax files and color files, I accidentally deleted all vim file from /usr/share/
I originally installed vim with sudo apt-get install vim
To get back the files, I tried:
sudo apt-get remove, install, update, upgrade, and hg clone https://vim.googlecode.com/hg/ vim and make. The files I got with make doesn't seem to do much for me and are not identical to what I had before with get install vim in usr/share/ folder
with apt-get install, normal vim works but no syntax, color or other available things that was in vim file are all missing.
How do I completely reinstall vim / get back the default files?
Thanks
Just found it,
sudo apt-get purge vim
sudo apt-get install vim
seems to fix it for me. I spent unnecessarily too long on this to find a solution. Oh, well.
As a part of installing Ubuntu on my computer, i apt-get installed cabal. After running cabal update, i ran cabal install darcs, discovered that i needed curses, installed libncurses5-dev, discovered that i needed curl, installed that, and when it still didn't work, ran cabal install darcs -f-curl.
This worked, but darcs doesn't run from the shell when just running darcs. It was installed in ~/.cabal/bin/darcs, so i made a link from there to /bin. Darcs now works from the shell, but i am left wondering if there is a better way to do it, perhaps running cabal install under sudo?
cabal by default installs without needing administrator privileges. As such, it can't install into e.g. /usr/bin. Since $HOME/bin isn't a standard, the compromise is to put executables into ~/.cabal/bin.
You can then add ~/.cabal/bin to your path to see these executables (e.g. by appending the following to your .bashrc:
export $PATH=$PATH:~/.cabal/bin
If you have admin privledges in your machine, by all means use the --global flag.
Firstly, do not use sudo. Even when run under root, cabal builds stuff in your home directory, so using sudo indiscriminately can lead to root-owned files in your ~/.cabal. Instead, set root-cmd: sudo in your /.cabal/config, then cabal with the --global option will invoke that command as appropriate.
Secondly, using local installs is generally more convenient and safer than using global ones, because you keep your package manager and cabal separate. So you could just as well add this to your ~/.bashrc:
export PATH=$HOME/.cabal/bin:$PATH
and then continue to install stuff without using sudo at all.
See also: a slightly over-pessimistic, but nevertheless informative article on cabal package management.
The --global flag is what is needed in this case. Running sudo cabal install darcs -f-curl --global, with -f-curl because cabal couldn't find curl, --global to make it install into usr/local/bin, and sudo just to be sure, works.
I need to install the file 'html.sty', but don't know what package it's in. I think I need to install something called latex2e, but I don't know what package has that.
You can find some information about installing LaTeX at https://help.ubuntu.com/community/LaTeX, although I have to wonder why you would need the file html.sty (a LaTeX style file) if you don't already have LaTeX installed. But anyway: probably the simplest way to install LaTeX and a lot the associated stuff you might or might not use with it, is
sudo apt-get install texlive-full
EDIT: According to some Google search results I just found, html.sty comes with the package latex2html. Running
sudo apt-get install latex2html
should suffice to install it.