0

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

6
  • 3
    You can't; it's in the AUR, not the official repos. Please read the wiki entry on the AUR.
    – jasonwryan
    Dec 5, 2013 at 23:00
  • @jasonwryan You can pacman -U.
    – Sparhawk
    Feb 5, 2016 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, 2016 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, 2016 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, 2016 at 5:51

2 Answers 2

2

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
1
  • 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, 2016 at 5:50
-3
sudo yaourt -S sublime-text-dev

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .