Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 30
Hello all, I'm running Debian, but it seems I only have the vim-tiny package. I need the full VIM package, because I would like syntax highlighting. Here's the error I ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59

    [SOLVED] How to Install VIM

    Hello all,

    I'm running Debian, but it seems I only have the vim-tiny package. I need the full VIM package, because I would like syntax highlighting.

    Here's the error I get when I try ":syntax on" command in VIM: Sorry, the command is not available in this version: syntax on

    Now, I've tried apt-get on the following recommended packages, but nothing seems to work
    • vim-rt
    • vim-full
    • vim


    Here is a list of install VIM packages that I have
    Code:
    mainbox:/var/www/selfservice# dpkg -l vim*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    un  vim            <none>         (no description available)
    ii  vim-common     1:7.1.314-3+le Vi IMproved - Common files
    un  vim-gnome      <none>         (no description available)
    un  vim-gtk        <none>         (no description available)
    un  vim-lesstif    <none>         (no description available)
    un  vim-nox        <none>         (no description available)
    un  vim-runtime    <none>         (no description available)
    ii  vim-tiny       1:7.1.314-3+le Vi IMproved - enhanced vi editor - compact v
    mainbox:/var/www/selfservice#
    FYI here is my output for trying to install VIM
    Code:
    mainbox:/var/www/selfservice# apt-get install vim
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package vim is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package vim has no installation candidate
    mainbox:/var/www/selfservice#
    Any ideas??

    Thanks!
    Last edited by phpguy; 02-11-2011 at 02:39 PM.

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    have you run apt-get update command first to get full package list?

    it should be vim-full or vim, i don't know what version of debian you have

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59
    Quote Originally Posted by coopstah13 View Post
    have you run apt-get update command first to get full package list?

    it should be vim-full or vim, i don't know what version of debian you have
    I just ran apt-get update, and I still get the same error in VIM.

    I also get the same output when I try "apt-get install vim". When I try vim-full it says it cannot find the package

    Presumably I have the latest version of Debian, because I downloaded it from the main website last month and that's the version I installed.

  4. #4
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,942
    Presumably I have the latest version of Debian
    what does the output of

    Code:
     cat /etc/issue
    display?

    Also

    Code:
    apt-cache policy vim
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  5. #5
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,093
    Quote Originally Posted by phpguy View Post
    Presumably I have the latest version of Debian, because I downloaded it from the main website last month and that's the version I installed.
    Hello, phpguy

    Note that Debian 6 was released just a few days ago, so you might not have the latest version installed unless you've upgraded from what you installed last month.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,942
    To elaborate on what has been said. Vim-Full is only available in Lenny. Squeeze, Wheezy, and Sid do not include Vim-full.

    Exact hits

    Source Package vim
    lenny (editors): 1:7.1.314-3+lenny2
    Binary packages: [hide 16 binary packages] vim, vim-common, vim-dbg, vim-doc, vim-full, vim-gnome, vim-gtk, vim-gui-common, vim-lesstif, vim-nox, vim-perl, vim-python, vim-ruby, vim-runtime, vim-tcl, vim-tiny

    squeeze (editors): 2:7.2.445+hg~cb94c42c0e1a-1
    Binary packages: [hide 11 binary packages] vim, vim-common, vim-dbg, vim-doc, vim-gnome, vim-gtk, vim-gui-common, vim-lesstif, vim-nox, vim-runtime, vim-tiny

    wheezy (editors): 2:7.3.035+hg~8fdc12103333-1
    Binary packages: [hide 11 binary packages] vim, vim-common, vim-dbg, vim-doc, vim-gnome, vim-gtk, vim-gui-common, vim-lesstif, vim-nox, vim-runtime, vim-tiny

    sid (editors): 2:7.3.035+hg~8fdc12103333-1
    Binary packages: [hide 11 binary packages] vim, vim-common, vim-dbg, vim-doc, vim-gnome, vim-gtk, vim-gui-common, vim-lesstif, vim-nox, vim-runtime, vim-tiny
    Hope that explains things.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  7. #7
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59
    Quote Originally Posted by rokytnji View Post
    what does the output of

    Code:
     cat /etc/issue
    display?

    Also

    Code:
    apt-cache policy vim
    Hello, here is the output for the two commands. Does this help at all?
    Code:
    mainbox:/var/www/selfservice# cat /etc/issue
    Debian GNU/Linux 5.0 \n \l
    
    mainbox:/var/www/selfservice# apt-cache policy vim
    vim:
      Installed: (none)
      Candidate: (none)
      Version table:
    mainbox:/var/www/selfservice#
    What does "policy" mean in apt-cache command above? Is the output stating that VIM isn't installed? How can this be, when I am clearly using it?

    Also, to answer your other point, I believe I am using Lenny. I can't recall how to verify, but I know I've seen it in my terminal at some point.

    To Ozar: It appears from the above command that I am running v5.0. However, is it true that I need to upgrade to 6.0 in order to use syntax highlighting for VIM? Is it possible for me to just get the essential files required for this (presumably vim-full not vim-tiny, which is what I seem to have now) ?


    Thanks

  8. #8
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,942
    apt-cache policy shows what is installed or installable. My output below for reference.

    Code:
    $ apt-cache policy vim
    vim:
      Installed: (none)
      Candidate: 2:7.3.035+hg~8fdc12103333-1
      Version table:
         2:7.3.035+hg~8fdc12103333-1 0
            500 http://ftp.us.debian.org/debian/ testing/main i386 Packages
    $ lsb_release -a
    Distributor ID:	Debian
    Description:	Debian GNU/Linux 6.0 (squeeze)
    Release:	6.0
    Codename:	squeeze
    As you can see. I don't have vim installed. The reason maybe you don't show vim as being installed is because you went outside of your package management system and installed vim statically from a download instead of using your package management like apt-get or synaptic. That is why vim works but does not show in apt. Your /etc/sources.list may be missing the repository for getting vim through apt. Hence why it does not show up as a install candidate like mine does. Just guessing though. I don't know what repository holds vim for Lenny which as you are correct in assumig you are running. You will have to google for that repository to add to your /etc/apt/sources.list to include it in synaptic which is just the gui front end for apt. Hope that makes sense to you. That is why we always recommend going through ones package management system to install a application. So it can be upgraded and shown in apt or synaptic.

    Edit:

    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    That shows you don't have the lenny repository that supplies VIM.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  9. #9
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,942
    Did the googling for you.
    The vim-puppet package provides filetype detection and syntax highlighting for puppet manifests (files ending with ".pp").
    Debian -- Details of package vim-puppet in lenny-backports

    To add Debian Lenny backports repository to your /etc/apt/sources.list

    read first

    Backports - Debian Wiki

    then go to

    Instructions

    and follow the instructions. Backports uses

    You are running Debian stable because you prefer the stable Debian tree. It runs great, there is just one problem: The software is a little bit outdated compared to other distributions. That is where backports come in.

    Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will run without new libraries (wherever it is possible) on a stable Debian distribution. It is recommended to pick out single backports which fit your needs, and not to use all backports available.
    which is why I suggest reading everything.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  10. #10
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59
    Hello Rokytnji,

    Thanks for your response again. I have not downloaded any packages manually; all packages were retrieved via apt-get.

    Here is the contents of my /etc/apt/sources.list. Does this help tell anything?
    Code:
    #
    # deb cdrom:[Debian GNU/Linux 5.0.7 _Lenny_ - Official i386 CD Binary-1 20101127-16:55]/ lenny main
    
    deb cdrom:[Debian GNU/Linux 5.0.7 _Lenny_ - Official i386 CD Binary-1 20101127-16:55]/ lenny main
    
    deb http://packages.dotdeb.org stable all
    deb-src http://packages.dotdeb.org stable all
    
    # Line commented out by installer because it failed to verify:
    deb http://security.debian.org/ lenny/updates main
    # Line commented out by installer because it failed to verify:
    deb-src http://security.debian.org/ lenny/updates main
    
    # Line commented out by installer because it failed to verify:
    deb http://volatile.debian.org/debian-volatile lenny/volatile main
    # Line commented out by installer because it failed to verify:
    deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
    Is there a way I can wipe what I have on there (in terms of VIM) and start fresh?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...