deb app install under terminal

本文介绍了如何使用sudodpkg和sudoapt-get进行Ubuntu系统的软件包管理,包括卸载不需要的软件包和安装新的软件包。
sudo dpkg -r package_name
sudo dpkg -i package_file.deb

sudo apt-get autoremove 要移除的软件包名
sudo apt-get install 要安装的软件包名

[20:43:02.961] Log Level: 2 [20:43:02.986] SSH Resolver called for "ssh-remote+root", attempt 1 [20:43:02.992] remote.SSH.useLocalServer = false [20:43:02.993] remote.SSH.useExecServer = true [20:43:02.993] remote.SSH.bindHost = {} [20:43:02.993] remote.SSH.showLoginTerminal = false [20:43:02.993] remote.SSH.remotePlatform = {} [20:43:02.993] remote.SSH.path = [20:43:02.994] remote.SSH.configFile = [20:43:02.994] remote.SSH.useFlock = true [20:43:02.994] remote.SSH.lockfilesInTmp = false [20:43:02.997] remote.SSH.localServerDownload = auto [20:43:02.997] remote.SSH.remoteServerListenOnSocket = false [20:43:02.998] remote.SSH.defaultExtensions = [] [20:43:02.998] remote.SSH.defaultExtensionsIfInstalledLocally = [] [20:43:02.998] remote.SSH.loglevel = 2 [20:43:02.998] remote.SSH.enableDynamicForwarding = true [20:43:02.998] remote.SSH.enableRemoteCommand = false [20:43:02.998] remote.SSH.serverPickPortsFromRange = {} [20:43:02.998] remote.SSH.serverInstallPath = {} [20:43:02.998] remote.SSH.permitPtyAllocation = false [20:43:02.998] remote.SSH.preferredLocalPortRange = undefined [20:43:02.999] remote.SSH.useCurlAndWgetConfigurationFiles = false [20:43:02.999] remote.SSH.experimental.chat = true [20:43:02.999] remote.SSH.experimental.enhancedSessionLogs = true [20:43:02.999] remote.SSH.httpProxy = {"*":""} [20:43:02.999] remote.SSH.httpsProxy = {"*":""} [20:43:03.009] VS Code version: 1.101.1 [20:43:03.010] Remote-SSH version: remote-ssh@0.120.0 [20:43:03.010] win32 x64 [20:43:03.015] SSH Resolver called for host: root [20:43:03.015] Setting up SSH remote "root" [20:43:03.025] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:03.025] Extensions to install: [20:43:03.032] Install and start server if needed [20:43:06.034] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe -V" [20:43:06.037] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\java8path\ssh.exe ENOENT [20:43:06.037] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V" [20:43:06.039] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT [20:43:06.039] Checking ssh with "C:\Windows\system32\ssh.exe -V" [20:43:06.040] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [20:43:06.040] Checking ssh with "C:\Windows\ssh.exe -V" [20:43:06.041] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [20:43:06.042] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [20:43:06.042] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [20:43:06.043] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [20:43:06.043] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [20:43:06.043] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [20:43:06.071] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 [20:43:06.076] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 51109 root sh [20:43:06.078] Generated SSH command: 'type "C:\Users\chen\AppData\Local\Temp\vscode-linux-multi-line-command-root-258649359.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 51109 root sh' [20:43:06.078] Using connect timeout of 17 seconds [20:43:06.079] Terminal shell path: C:\Windows\System32\cmd.exe [20:43:09.884] > root@192.168.124.6's password: [20:43:09.884] Got some output, clearing connection timeout [20:43:09.885] Showing password prompt [20:43:17.794] Got password response [20:43:17.794] "install" wrote data to terminal: "******" [20:43:17.847] > [20:43:18.372] > d55f9866d272: running > Script executing under PID: 18331 [20:43:18.448] > Found existing installation at /root/.vscode-server... > Starting VS Code CLI... > Removing old logfile at /root/.vscode-server/.cli.18e3a1ec544e6907be1e944a94c496e302073435.log > Spawned remote CLI: 18357 > Waiting for server log... [20:43:18.583] > Waiting for server log... > Waiting for server log... > Waiting for server log... [20:43:18.624] > Exec server process not found > sh: 418: kill: No such process [20:43:18.631] > [2023-03-02 21:21:50] error This machine does not meet Visual Studio Code Server's prerequisites, expected either... > - find GLIBC >= v2.28.0 (but found v2.27.0 instead) for GNU environments > - find /lib/ld-musl-aarch64.so.1, which is required to run the Visual Studio Code Server in musl environments > d55f9866d272: start > exitCode==207== > listeningOn==== > osReleaseId==ubuntu== > arch==aarch64== > vscodeArch==arm64== > bitness==64== > tmpDir==/run/user/0== > platform==linux== > unpackResult==== [20:43:18.640] > > didLocalDownload==0== > downloadTime==== > installTime==== > serverStartTime==== > execServerToken==a11aaa11-1a1a-1a11-111a-11aa111111a1== > platformDownloadPath==cli-alpine-arm64== > SSH_AUTH_SOCK==== > DISPLAY==== > d55f9866d272: end [20:43:18.640] Received install output: exitCode==207== listeningOn==== osReleaseId==ubuntu== arch==aarch64== vscodeArch==arm64== bitness==64== tmpDir==/run/user/0== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== serverStartTime==== execServerToken==a11aaa11-1a1a-1a11-111a-11aa111111a1== platformDownloadPath==cli-alpine-arm64== SSH_AUTH_SOCK==== DISPLAY==== [20:43:18.641] Resolver error: Error: 远程主机不满足运行VS Code服务器的先决条件 at y.ServerInstallError (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:744694) at p (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:739113) at t.handleInstallOutput (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:740589) at t.tryInstall (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:865534) at async c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824246 at async t.withShowDetailsEvent (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:827501) at async A (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:820760) at async t.resolve (c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:824898) at async c:\Users\chen\.vscode\extensions\ms-vscode-remote.remote-ssh-0.120.0\out\extension.js:2:1113660 [20:43:18.648] ------ [20:43:18.649] ---------- [Session Summary] ----------- [20:43:18.649] [LinuxPrereqs]: 远程主机可能不符合 glibc 和 libstdc++ VS Code 服务器的先决条件 (远程主机不满足运行VS Code服务器的先决条件) [20:43:18.649] ---------------------------------------- [20:43:18.858] > [20:43:19.386] Opening exec server for ssh-remote+root [20:43:19.439] Initizing new exec server for ssh-remote+root [20:43:19.439] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:19.439] Extensions to install: [20:43:19.462] Opening exec server for ssh-remote+root [20:43:19.464] Install and start server if needed [20:43:19.904] "install" terminal command done [20:43:19.905] Install terminal quit with output: [20:43:21.556] getPlatformForHost was canceled [20:43:21.556] Exec server for ssh-remote+root failed: Error: 已取消连接 [20:43:21.556] Existing exec server for ssh-remote+root errored (Error: 已取消连接) [20:43:21.556] Initizing new exec server for ssh-remote+root [20:43:21.557] Error opening exec server for ssh-remote+root: Error: 已取消连接 [20:43:21.557] ---------- [Session Summary] ----------- [20:43:21.557] [LinuxPrereqs]: 远程主机可能不符合 glibc 和 libstdc++ VS Code 服务器的先决条件 (远程主机不满足运行VS Code服务器的先决条件) [20:43:21.557] ---------------------------------------- [20:43:21.557] Using commit id "18e3a1ec544e6907be1e944a94c496e302073435" and quality "stable" for server [20:43:21.557] Extensions to install: [20:43:21.562] Install and start server if needed
06-21
以下是deb包的安装步骤: 1. 创建一个名为deb_pack的文件夹,用于存放相关文件。 2. 在deb_pack文件夹中创建一个名为helloworld的文件夹,并将需要安装的文件放入其中。 3. 在deb_pack文件夹中创建一个名为build_deb.sh的文件,并将以下代码复制到其中: ```shell #!/bin/bash set -e # 获取软件包名称和版本号 PACKAGE_NAME=$1 PACKAGE_VERSION=1.0 # 创建软件包目录结构 mkdir -p $PACKAGE_NAME-$PACKAGE_VERSION/DEBIAN mkdir -p $PACKAGE_NAME-$PACKAGE_VERSION/usr/bin mkdir -p $PACKAGE_NAME-$PACKAGE_VERSION/usr/share/$PACKAGE_NAME # 复制软件包文件到相应目录 cp $PACKAGE_NAME/* $PACKAGE_NAME-$PACKAGE_VERSION/usr/share/$PACKAGE_NAME/ cp $PACKAGE_NAME.sh $PACKAGE_NAME-$PACKAGE_VERSION/usr/bin/$PACKAGE_NAME # 创建控制文件 cat > $PACKAGE_NAME-$PACKAGE_VERSION/DEBIAN/control <<EOF Package: $PACKAGE_NAME Version: $PACKAGE_VERSION Section: base Priority: optional Architecture: all Depends: bash (>= 4.0) Maintainer: Your Name <youremail@example.com> Description: Your description here. EOF # 构建deb包 dpkg-deb --build $PACKAGE_NAME-$PACKAGE_VERSION ``` 4. 在终端中进入deb_pack文件夹,并运行以下命令以构建deb包: ```shell sudo ./build_deb.sh helloworld helloworld.deb ``` 5. 构建完成后,在deb_pack文件夹中会生成一个名为helloworld.deb的文件。 6. 运行以下命令以安装deb包: ```shell sudo dpkg -i helloworld.deb ``` 7. 运行以下命令以启动安装的软件: ```shell helloworld ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值