Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install sublime-text 2 in Arch Linux with pacman package manager; how i can do this work?

share|improve this question
3  
You can't; it's in the AUR, not the official repos. Please read the wiki entry on the AUR. – jasonwryan Dec 5 '13 at 23:00
    
@jasonwryan You can pacman -U. – Sparhawk Feb 5 at 5:45
    
@Sparhawk that only works after you have a package to install on your machine; which means learning how the AUR and makepkg work... – jasonwryan Feb 5 at 5:47
    
@jasonwryan Yes, that's true, but the installed package will still be managed by pacman, as opposed to make installing it in unknown locations. – Sparhawk Feb 5 at 5:48
    
@Sparhawk ...and your point is? OP still has to learn how the AUR works in order to install sublime-text. Pacman won't do the work the way it does for official repos. – jasonwryan Feb 5 at 5:51

Since sublime-text is a package in AUR you will need to install some pacman helper like packer. To install packer:

pacman -S base-devel fakeroot jshon expac git
#create a dir somewhere, eg. $HOME
mkdir ~/packer/
cd ~/packer
wget https://aur.archlinux.org/packages/pa/packer/PKGBUILD
#Run makepkg on the PKGBUILD as a regular user
makepkg
#install the package with (as root)
pacman -U packer-*.pkg.tar.gz

Personally I go beyond this and also edit ~/.bashrc to add some aliases like these:

alias pac="sudo /usr/bin/packer -S"             # default action        - install one or more packages
alias pacu="/usr/bin/packer -Syu"               # '[u]pdate'            - upgrade all packages to their newest version
alias pacs="/usr/bin/packer -Ss"                # '[s]earch'            - search for a package using one or more keywords
alias paci="/usr/bin/packer -Si"                # '[i]nfo'              - show information about a package
alias paclo="/usr/bin/packer -Qdt"              # '[l]ist [o]rphans'    - list all packages which are orphaned
alias pacc="sudo /usr/bin/packer -Scc"          # '[c]lean cache'       - delete all not currently installed package files
alias paclf="/usr/bin/packer -Ql"               # '[l]ist [f]iles'      - list all files installed by a given package
alias pacexpl="/usr/bin/packer -D --asexp"      # 'mark as [expl]icit'  - mark one or more packages as explicitly installed 
alias pacimpl="/usr/bin/packer -D --asdep"      # 'mark as [impl]icit'  - mark one or more packages as non explicitly installed
alias pacro="/usr/bin/packer -Qtdq > /dev/null && sudo /usr/bin/packer -Rs \$(/usr/bin/packer -Qtdq | sed -e ':a;N;$!ba;s/\n/ /g')" #[r]emove [o]rphaned packages - BE CAREFULL
share|improve this answer
    
Well, technically you don't need to install a helper. You can manually install it the same way you installed packer (although in this case you'd need to download snapshot instead of just the PKGBUILD). – Sparhawk Feb 5 at 5:50
sudo yaourt -S sublime-text-dev
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.