Vim

pkg安裝後vim在哪裡?

  • October 2, 2016

使用 FreeBSD 邁出第一步。從我想的安裝開始vim,但是:

root@rpi:~ # pkg install vim
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (1 conflicting)
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed
root@rpi:~ # vim
vim: Command not found.
root@rpi:~ # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
root@rpi:~ # find / -type f -name vim
root@rpi:~ # find / -type l -name vim
root@rpi:~ # echo $SHELL
/bin/csh
root@rpi:~ # rehash
root@rpi:~ # vim
vim: Command not found.

即使reboot情況相同:

root@rpi:~ # vim
vim: Command not found.

我錯過了什麼?pkg不能真的做它應該做的,不是嗎?

root@rpi:~ # pkg delete vim
Checking integrity... done (0 conflicting)
Package(s) not found!

vim-lite安裝OK。

root@rpi:~ # pkg info -l vim
pkg: No package(s) matching vim

root@rpi:~ # pkg which /usr/local/bin/vim
/usr/local/bin/vim was installed by package vim-lite-7.4.1832

pkg upgrade沒有發現要升級的東西,但是pkg autoremove刪除了所有vim依賴項:

root@rpi:~ # pkg autoremove
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 70 packages:

Installed packages to be REMOVED:
   atk-2.18.0
   harfbuzz-1.2.3
   pango-1.38.0_1
   cairo-1.14.6,2
   cscope-15.8b
   ctags-5.8
   libXdamage-1.1.4_3
   libglapi-11.2.2
   gbm-11.2.2
   libEGL-11.2.2
   libGL-11.2.2
   damageproto-1.2.1
   xorg-fonts-truetype-7.7_1
   dejavu-2.35
   dri2proto-2.8
   encodings-1.0.4_3,1
   fontconfig-2.11.1_2,1
   libXft-2.3.2_1
   font-misc-meltho-1.0.3_3
   font-bh-ttf-1.0.3_3
   font-misc-ethiopic-1.0.3_3
   libXfixes-5.0.1_3
   fixesproto-5.0
   font-util-1.3.1
   mkfontscale-1.1.2
   mkfontdir-1.0.7
   freetype2-2.6.3
   libXpm-3.5.11_4
   python27-2.7.11_3
   glib-2.46.2
   llvm37-3.7.1_2
   glproto-1.4.17
   graphite2-1.3.8
   icu-55.1
   libX11-1.6.3,1
   libXt-1.1.5,1
   libXv-1.0.10_3,1
   libXvMC-1.0.9
   libXrender-0.9.9
   libXext-1.3.3_1,1
   libXxf86vm-1.1.4_1
   kbproto-1.0.7
   libSM-1.2.2_3,1
   libICE-1.0.9_1,1
   libxcb-1.11.1
   xcb-util-0.4.0_1,1
   xcb-util-renderutil-0.3.9_1
   libXau-1.0.8_3
   libXdmcp-1.1.2
   libdevq-0.0.2_1
   libdrm-2.4.66,1
   ruby-2.2.5,1
   lua52-5.2.4
   libffi-3.2.1
   libfontenc-1.1.3
   libiconv-1.14_9
   libpciaccess-0.13.4
   libpthread-stubs-0.3_6
   libxshmfence-1.2
   libyaml-0.1.6_2
   pciids-20160522
   pixman-0.34.0
   png-1.6.21
   readline-6.3.8
   renderproto-0.11.1
   tcl86-8.6.5_1
   videoproto-2.3.2
   xextproto-7.3.0
   xf86vidmodeproto-2.3.1
   xproto-7.0.28

The operation will free 402 MiB.

Proceed with deinstalling packages? [y/N]: y
[...]

安裝 vim-lite 後findfrom before 找到vim二進製文件:

root@rpi:~ # find / -type f -name vim
/usr/local/bin/vim

所以pkg真的沒有安裝包。

好吧,這很奇怪。

在 RPi 上,pkg install vim下載了 46 個包,但只安裝了其中的 17 個。因此vim-7.4.1832.txz從未實際安裝。

顯然,這是 ARM 平台上的一個或多個包的錯誤。

希望你現在可以忍受vim-lite

我猜你正在使用預設的 FreeBSD shell csh:?

這不是bashrehash在嘗試訪問剛剛安裝的命令之前,您需要使用簡單的命令更新您的 shell 目前命令字典。

引用自:https://unix.stackexchange.com/questions/313768