I want to install sublime-text 2 in Arch Linux with pacman
package manager; how i can do this work?
2 Answers
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
-
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).– SparhawkFeb 5, 2016 at 5:50
pacman -U
.makepkg
work...pacman
, as opposed tomake install
ing it in unknown locations.