kscope安装教程 (linux环境下的代码阅读、编辑工具)

下面链接下载1.6版的deb
http://archive.ubuntu.com/ubuntu/pool/universe/k/kscope/kscope_1.6.0-1_i386.deb
直接安装后,但这时并不能运行,因为kscope不支持kde4的库,但我们可以下载旧的库,在终端下输入:

kscope

会出现以下错误

kscope: error while loading shared libraries: libkateutils.so.0: cannot open shared object file: No such file or directory   

   处理方法:
   dpkg -i kate_3.5.9.dfsg.1-6+lenny1_i386.deb

使用脚本安装的方法

#!/bin/bash
# This script helps you install Kscope on Ubuntu 9.04.
# You can also use it to fix "Kscope doesn't run in KDE4" bug.

echo "Determining machine hardware name... "
MACHINE=`uname -m`
case "$MACHINE" in
  i386 | i586 | i686)
    ARCH="i386"
    ;;
  x86_64)
    ARCH="amd64"
    ;;
  *)
    ARCH="i386"
    ;;
esac

# If Kscope is not installed, install it.
which kscope &> /dev/null
if [ $? -ne 0 ]; then
  echo "Installing kscope..."
  sudo apt-get install kscope || \
  wget http://archive.ubuntu.com/ubuntu/pool/universe/k/kscope/kscope_1.6.0-1_${ARCH}.deb && \
  sudo dpkg -i kscope_*.deb || \
  sudo apt-get -fy install || \
  echo "Oops, some error happens..."
fi

kscope -v &> /dev/null
if [ $? -eq 0 ]; then
  echo "Kscope works fine."
  exit
fi

echo "Downloading KDE3 libraries needed by kscope..."
wget http://ftp.debian.org/debian/pool/main/k/kdebase/kate_3.5.9.dfsg.1-6+lenny1_${ARCH}.deb
dpkg -x kate_3*.deb kate

echo "Installing KDE3 libraries..."
sudo cp kate/usr/lib/libkateinterfaces.so.0.0.0 /usr/local/lib/
sudo cp kate/usr/lib/libkateutils.so.0.0.0 /usr/local/lib
sudo ln -s /usr/local/lib/libkateinterfaces.so.0.0.0 /usr/local/lib/libkateinterfaces.so.0
sudo ln -s /usr/local/lib/libkateutils.so.0.0.0 /usr/local/lib/libkateutils.so.0
sudo ldconfig

echo "Finished."

可是在使用的时候出现如下错误提示:

Determining machine hardware name... 
Downloading KDE3 libraries needed by kscope...
--2010-12-30 22:44:04--  http://ftp.debian.org/debian/pool/main/k/kdebase/kate_3.5.9.dfsg.1-6_amd64.deb
登陆http://ftp.debian.org/debian/pool/main/k/kdebase/目录下,发现/kate_3.5.9.dfsg.1-6_amd64.deb已经变为kate_3.5.9.dfsg.1-6+lenny1_${ARCH}.deb,将脚本重新修改一下文件名然后执行,就可以正常安装kscope使用了。

注意,如果安装出了问题可以:

sudo apt-get install -f

或者

sudo dpkg --configure -a

你可能感兴趣的:(linux,object,File,脚本,ubuntu,终端)