ldconfig命令为何找不到?

huangwu007 2002-04-12 07:38:02
我在root用户登录运行ldconfig
系统提示:
bash: ldconfig: command not found

我查了ldconfig在./sbin/下,为什么会说command not found?
(我在./sbin/下运行也是这样的)
...全文
4215 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
repus 2002-04-15
  • 打赏
  • 举报
回复
su -
这样可以得到和用root登录一样的环境(使用目标用户的shell作为登录shell)
linuxnewer 2002-04-15
  • 打赏
  • 举报
回复 1
呵呵,干脆指明路径运行算了。
/sbin/ldconfig
huangwu007 2002-04-15
  • 打赏
  • 举报
回复
是,我是用其他帐户telnet上去再su成root的,
./root/.bash_profile文件里path不是包含了:/sbin
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export USERNAME BASH_ENV PATH


./etc/profile该怎么修改呢?
# /etc/profile

# System wide environment and startup programs
# Functions and aliases go in /etc/bashrc

if ! echo $PATH | /bin/grep -q "/usr/X11R6/bin" ; the
PATH="$PATH:/usr/X11R6/bin"
fi

ulimit -S -c 1000000 > /dev/null 2>&1
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
umask 002
else
umask 022
fi

USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
"profile" [readonly] 36L, 627C
linuxnewer 2002-04-13
  • 打赏
  • 举报
回复
你用其他帐户telnet上去再su成root的,是不是?
这样的话你的path不对。
执行:
. /etc/profile
. /root/.bash_profile
huangwu007 2002-04-12
  • 打赏
  • 举报
回复
是ldconfig,用来更新高速缓冲区/etc/ld.so.cache
man ldconfig还能看到说明
路径没错
twit_book 2002-04-12
  • 打赏
  • 举报
回复
应该是ifconfig吧?
可能是你的系统路径不对。
huangwu007 2002-04-12
  • 打赏
  • 举报
回复
另:我是telnet上去的,这有关系吗?

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧