-bash: sudo: コマンドが見つかりません。

-bash: sudo: コマンドが見つかりません。

djangoアプリケーションをデプロイしようとしています。印刷する apt-get update とき

W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

印刷する sudo apt-get update とき

-bash: sudo: command not found

su代わりに試してみましたが、sudo変です。たとえば、su apt-get update 何も起こらない場合は、新しい行だけが表示されます。

(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$

いくつかのパッケージをインストールしようとしても同じです。私は何をすべきですか?

有用な情報なら - 私はDebianを使用しています

(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux

ベストアンサー1

sudo は Debian にデフォルトでインストールされていませんが、インストールできます。まず、suモードを有効にします。
su -

次のコマンドを実行してsudoをインストールします。
apt-get install sudo -y

その後、ユーザーと権限を実験する必要があります。自分のユーザーに sudo 権限を付与します。

usermod -aG sudo yourusername

sudoersファイルにsudoグループが追加されていることを確認してください。実行:
visudosudoersファイルを変更し、次の行を追加します(見つからない場合)。

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

変更を適用するには、再度ログインするか、デバイスを完全に再起動する必要があります。

おすすめ記事