我正在尝试通过 SSH 将项目部署到远程服务器,但command not found
无论我输入sudo
或 ,我总是收到此错误yum
。到目前为止,我已经检查了一些帖子,但仍然不知道如何解决它。
我的本地操作系统是这样的,所以我通过在终端中Ubuntu 18.04
输入直接连接到服务器。ssh username@hostname
更多数据:
的输出cat /etc/os-release
:
galtecch@s063 [/etc/yum.repos.d]# cat /etc/os-release
NAME="CloudLinux"
VERSION="7.5 (Viktor Gorbatko)"
ID="cloudlinux"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.5"
PRETTY_NAME="CloudLinux 7.5 (Viktor Gorbatko)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:cloudlinux:cloudlinux:7.5:GA:server"
HOME_URL="https://www.cloudlinux.com/"
BUG_REPORT_URL="https://www.cloudlinux.com/support"
完整列表/etc
:
galtecch@s063 [/etc]# ls
./ GeoIP.conf.default mime.types senderverifybypasshosts
../ ghostscript/ motd services
aliases group my.cnf shadow
aliases.db host.conf my.cnf.d/ skel/
alternatives/ hosts nsswitch.conf skipsmtpcheckhosts
at.deny ImageMagick/ odbcinst.ini spammeripblocks
backupmxhosts init.d/ openldap/ ssh/
bashrc inputrc os-release ssl/
blackfire/ issue pam.d/ subversion/
cl.nodejs@ issue.net passwd sysconfig/
cloudlinux-release ld.so.cache pki/ system-release@
cl.php.d/ ld.so.conf profile system-release-cpe
cl.selector/ ld.so.conf.d/ profile.d/ trusted-key.key
cron.daily/ localtime@ protocols trustedmailhosts
default/ lynx.cfg redhat-release@ vimrc
DIR_COLORS lynx.lss relayhosts@ virc
DIR_COLORS.256color lynx-site.cfg resolv.conf wgetrc
DIR_COLORS.lightbgcolor mail/ rpc yum.repos.d/
domainusers mailcap rpm/ zlogin
environment mailhelo rsyncd.conf zlogout
.etc.version mailips sasl2/ zprofile
fonts/ mail.rc scl/ zshenv
gcrypt/ man_db.conf screenrc zshrc
GeoIP.conf mc/ security/
正如你所看到的etc/yum.repos.d/
,里面有:
galtecch@s063 [/etc/yum.repos.d]# ls
./ ../ centos-extras.repo cloudlinux-imunify360.repo cloudlinux.repo
一些 yum 命令:
galtecch@s063 [/etc/yum.repos.d]# uname -r
3.10.0-714.10.2.lve1.5.19.3.el7.x86_64
galtecch@s063 [/etc/yum.repos.d]# yum
-bash: yum: command not found
galtecch@s063 [/etc/yum.repos.d]# which yum
galtecch@s063 [/etc/yum.repos.d]# echo $PATH
/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/puppetlabs/bin:/usr/local/bin:/usr/X11R6/bin:/home/galtecch/bin
galtecch@s063 [/etc/yum.repos.d]# rpm -q yum
-bash: rpm: command not found
galtecch@s063 [/etc/yum.repos.d]# find /bin/ /usr/bin -name yum
galtecch@s063 [/etc/yum.repos.d]# find /bin/ /usr/bin -name yum*
galtecch@s063 [/etc/yum.repos.d]# ls -l /etc/yum.conf
/bin/ls: cannot access /etc/yum.conf: No such file or directory
答案1
我已联系供应商,结果发现共享服务器上不允许 root 访问。我会尝试想一个更简单的方法来做到这一点。时间