Simple SSH - Code example

本文通过一个具体的Java示例代码展示了如何使用ch.ethz.ssh2库进行SSH连接,包括认证过程、执行远程命令并获取输出结果等关键步骤。

package com.xxx.mobile.util;

 

import java.io.*;

import ch.ethz.ssh2.*;

 

public class simpleSSH {

      

       public static void main(String[] args) throws IOException {

                 Connection conn = new Connection("xx.xxx.xx.xxx");

                 conn.connect();

                 File pemKeyFile = new File("mailcontrol");

                boolean isAuth = conn.authenticateWithPublicKey("mailcontrol", pemKeyFile, "xxx");

                 if (isAuth == false) {

                   throw new IOException("Authenticationfailed.");

                 }

             

                 Session sess = conn.openSession();

                 //sess.execCommand("netstat -nl | egrep':80' | wc -l");

                 sess.execCommand("ls -nl");

                 InputStream inp = sess.getStdout();

                 InputStreamReader reader = newInputStreamReader(inp);

                 BufferedReader br = new BufferedReader(reader); 

                              

                 String line=null;

                    while (true)

                    {

                          line = br.readLine();

                          if (line == null)

                                 break;

                          System.out.println(line);

                    }

             

                 sess.close();

                 conn.close();

               }

 

}

 

total 21892

-rw-rw-r-- 1 500 500    2276Aug 29 09:58 1

-rw-r--r-- 1 500 500 9417247 Nov 23 10:20app.all.log

-rw-r--r-- 1 500 500 5575712 Nov 23 10:20app.cap

-rw-r--r-- 1 500 500 6973712 Nov 23 10:21app.log.lync

-rw-rw-r-- 1 500 500   20125 Oct 3113:50 ashleyb

-rw------- 1 500 500    674 Aug  1 07:16 authorized_keys2

-rw------- 1 500 500    589 Aug  1 07:15 authorized_keys2.~orig

drwxr-xr-x 7 500  0    4096 Nov  6 14:36 bbc30

drwxrwx--- 2 500 500    4096Aug 21  2011 bin

-rwxr-xr-x 1 500 500    1867Sep 14 08:00 checkcluster

drwxrwx--- 2 500 500    4096Aug 21  2011 fwupdate

-rw-rw-r-- 1 500500      37 Jun 27 00:10 mon.sh

-rw------- 1 500 500  172922 Nov 1613:03 nohup.out

-rw-rw-r-- 1 500500       3 Sep 21 09:26 result

-rw-rw-r-- 1 500 500    753 Sep  5 03:41 server.csr

-rw-rw-r-- 1 500 500    963 Sep  5 03:39 server.key

-rw-rw-r-- 1 500500      70 Jun 27 00:15 settime.sh

-rw-rw-r-- 1 500 500    1036Sep 20 09:43 t.txt

drwxr-xr-x 2   0  0    4096 Aug 21  2011 test

-rw-rw-r-- 1 500 500  110160 Oct 3111:00 toproduction.sh

drwxr-xr-x 2   0  0    4096 Aug 21  2011 utils-product

-r-xr-xr-x 1 500 500    2851Feb 28  2012 vpn_templete.plist

-rwxr-xr-x 1 500 500   20128 Nov 16 05:37 zapcluster2

#! /bin/bash function ascend_git_mm_init { echo "0:Main Branch(Default, Onetrack, br_hisi_trunk_ai)" echo "1:David Kernel Version 6.6" echo "2:David Kernel Version 5.10" echo "3:David Chip BVersion" echo "4:David Chip BVersion 510" echo "5:David Chip BVersion 600" echo "6:David Chip BVersion 610" echo "7:New Main Branch(Chip BVersion 610: br_bbit_torino_v100r001c10_protype_20240410)" echo "8:David Chip BVersion 630" echo "9:David Chip BVersion 632" echo "10:David Chip BVersion 800" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then #echo "git mm Init David Kernel 6.6 Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c15_1982_kernel_switch -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I2" ]] then #echo "git mm Init David Kernel 5.10 Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_1982_chip_verify -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I3" ]] then #echo "git mm Init David Kernel 6.6 & UB Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl310_0515 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I4" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl510_0510 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I5" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_eslb600_0606 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I6" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_eslb610_0706 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I7" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_protype_20240410 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I8" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl630_0826 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I9" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I10" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b600_soc_abl -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_hisi_trunk_ai -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function ascend_pull_toolchain { #echo $ost $cpua if [[ "${ost}" == "openeuler" ]] then git mm sync \ hisi/bin/toolchain/"${cpua}"/euleros/ccec_libs_url \ hisi/bin/toolchain/"${cpua}"/euleros/hcc_libs_url \ hisi/bin/toolchain/"${cpua}"/euleros/llvm_libs_url \ -j$((`nproc` - 1)) else git mm sync \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/ccec_libs_url \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/hcc_libs_url \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/llvm_libs_url \ -j$((`nproc` - 1)) fi if [[ "${ost}" == "ubuntu" || "${ost}" == "centos" ]] && [[ "${cpua}" == "x86" ]] then git mm sync hisi/bin/toolchain/x86/ubuntu/hcc_r52_libs_url -j$((`nproc` - 1)) fi } function ascend_pull_comsrc { if [[ -d cmake ]] then cd cmake git checkout . cd "${rootdir}" fi if [[ -d tests/kernel ]] then rm -rf tests/kernel fi #aisdk-product/driver/aisdk_bsp \ #hisi/bios \ #hisi/bootloader/xloader \ #hisi/drivers/network \ #hisi/bootloader/onchiprom_flash \ git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/tests/kernel/linux-6.6 \ open_source/kernel-6.6 \ hisi/kernel/vendor \ hisi/libc_sec \ -j$((`nproc` - 1)) } function pull_codes { read -p "Need Pull Turing Solution Codes Y/y or N/n: " rp rp=${rp^^} if [[ "I${rp}" != "IY" ]] then return fi if [[ ! -d .mm ]] then # echo git mm init "${prds}"_git_mm_init fi git mm sync open_source/libjpeg-turbo repohooks ascend_pull_toolchain if [[ ("${prds}" == "ascend" || "${prds}" == "pegasus") ]] then "${prds}"_pull_comsrc else common_pull_comsrc fi #git mm info -a } function pegasus_git_mm_init { echo "0:Main Branch(Default, Onetrack, br_hisi_trunk_ai)" echo "1:Hi1952V100 Kernel Version 5.10" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then #git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_feature_pegasus_v200r001c10_chipout_test_1126 -g all -p auto git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_pegasus_v200r001c10_protype_20241018 -g all -p auto else #echo "git mm Init Main Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_hisi_trunk_ai -g all -p auto fi #git mm info -a } function pegasus_pull_comsrc { # peguas build need # $rootdir/build/bin/os 下AOS目录存在,AOS的压缩包解压会报错,未知原因 if [[ -d build/bin/os ]] then sudo rm -rf build/bin/os* fi git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/libc_sec \ -j$((`nproc` - 1)) #Godel_VOS/release/VOS \ #git mm info -a } function solomon_git_mm_init { echo "0:Main Branch(Default, Onetrack, Solomon Chip BVersion 500)" echo "1:Solomon Chip BVersion 500" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function DavidV121_git_mm_init { echo "0:Main Branch(Default, Onetrack)" echo "1:DavidV121 Chip BVersion 800" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b530 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://git@szv-cr-y.codehub.huawei.com:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b530 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function common_pull_comsrc { # peguas build need # $rootdir/build/bin/os 下AOS目录存在,AOS的压缩包解压会报错,未知原因 if [[ -d build/bin/os ]] then sudo rm -rf build/bin/os* fi git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/tests/kernel/linux-6.6 \ open_source/kernel-6.6 \ hisi/kernel/vendor \ hisi/libc_sec \ -j$((`nproc` - 1)) #Godel_VOS/release/VOS \ #git mm info -a } function pull_monalisa { cdir="${rootdir}"/tests/chipveri mdir="${cdir}"/monalisa mkdir -p tests "${cdir}" read -p "Need Pull monalisa code now, Y/y or N/n: " rp rp=${rp^^} if [[ "I${rp}" != "IY" ]] then return fi read -p "Input Checkout Branch name: " cbrm # $(()) only for digital #$(("Y${cbrm}" == "Y" ? cbrm="" : cbrm="-b ${cbrm}")) #[[ "Y${cbrm}" == "Y" ]] && gcbrm="" || gcbrm="-b ${cbrm}" if [[ -d ${mdir} ]] then cd "${mdir}" if [[ -d .git ]] then git checkout "${cbrm}" cd "${rootdir}" return fi rm -rf * .g* cd "${rootdir}" fi if [[ "Y${cbrm}" != "Y" ]] then cd "${cdir}" echo `git clone https://codehub-dg-y.huawei.com/ICT_bringup/monalisa/monalisa.git -b ${cbrm}` cd - else return fi read -p "Need Create Monalisa Branch, Y/y or N/n: " cbrm cbrm=${cbrm^^} if [[ "I${cbrm}" == "IY" ]] then cd "${mdir}" read -p "Input Branch name: " cbrm git branch ${cbrm} git checkout ${cbrm} read -p "Need Push Branch To remote now, Y/y or N/n: " pb pb="${pb^^}" if [[ "I${pb}" == "IY" ]] then git push origin "${cbrm}" fi fi cd "${rootdir}" } function code_init { sudo rm -rf a* b* c* d* C* D* H* i* M* o* p* r* tee tools v* .mm pull_monalisa pull_codes } function get_osinfo { cpua=`arch` ost=`lsb_release -a | grep "Distributor ID" | awk -F":" '{print $2}' | sed 's/^[ \t]*//g'` osdst=${ost,,} if [[ "${osdst}" != "ubuntu" ]] && [[ "${osdst}" != "centos" ]] && [[ "${osdst}" != "euleros" ]] && [[ "${osdst}" != "openeuler" ]] then echo "UnSupport OS Type!" exit 1 fi if [[ "${cpua}" == "x86_64" ]] then cpua="x86" else cpua="arm64" fi echo "OS Distr: "$osdst"CPU Arch:"$cpua } function git_install { # install git lfs curl -k https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/CodeHub/git-lfs/release.v2/git_lfs_autoinstall.sh | sudo sh - && (git lfs uninstall; git lfs install) # 设置git默认编辑器 if [ -e "/usr/bin/vim" ]; then git config --global core.editor vim else git config --global core.editor vi fi echo "git install succ" } function dtc_build { dtcp=`which dtc` if [[ $dtcp != '' ]] then return fi git clone https://codehub-dg-y.huawei.com/ICT_bringup/tools/dtc.git cd dtc make all sudo make install cd - rm -rf dtc } function python_install { pypath=`which python3` # force python link to python3 sudo ln -sf $pypath /usr/bin/python # install pip3 for python3 pippath=`which pip3` if [[ $pippath == '' ]] then sudo apt install python3-pip fi sudo pip3 install Gitdb -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install GitPython -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install PyYAML -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install ruamel.yaml -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install ruamel.yaml.clib -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install rich -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install pytest -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install toml -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com # sudo pip3 install textual-dev -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install httpx -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install openpyxl -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo chmod 755 -R /usr/local/lib/python3* sudo chmod 755 -R /usr/local/lib64/python3* echo "Python install succ" } function ascend_modsig_init { #curl -s -o `pwd`/signature-jenkins-slave-5.1.19-RELEASE.zip https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-builtools-prod/SignatureClient/0599A7L5/toolVersion/0599AC25/20221119162112511/Software/signature-jenkins-slave-5.1.19-RELEASE.zip wget --no-check-certificate -P `pwd`/ https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-builtools-prod/SignatureClient/0599A7L5/toolVersion/0599AC25/20221119162112511/Software/signature-jenkins-slave-5.1.19-RELEASE.zip #curl -s -o `pwd`/jre-8u392-linux-x64.tar.gz https://cmc-hgh-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/Huawei%20JDK/Huawei%20JDK%20V100R001/Huawei%20JDK%20V100R001C00SPC390B003/jre-8u392-linux-x64.tar.gz wget --no-check-certificate -P `pwd`/ https://cmc-hgh-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/Huawei%20JDK/Huawei%20JDK%20V100R001/Huawei%20JDK%20V100R001C00SPC390B003/jre-8u392-linux-x64.tar.gz sudo unzip signature-jenkins-slave-5.1.19-RELEASE.zip -d /usr/local/ rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/root.jks sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/client.jks sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ssl.properties sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/trustcerts/root.crt sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/root.jks sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/client.jks sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/ssl.properties sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/trustcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/root.crt sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/certs/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/G2RootCATest.cer sudo cp /usr/local/signature-jenkins-slave-5.1.19-RELEASE/signature.jar /usr/local/signature-jenkins-slave-5.1.19-RELEASE/lib sudo cp jre-8u392-linux-x64.tar.gz /usr/local/signature-jenkins-slave-5.1.19-RELEASE/ sudo chmod -R 755 /usr/local/signature-jenkins-slave-5.1.19-RELEASE/ #unzip signature-jenkins-slave-5.1.19-RELEASE.zip #mv jre-8u392-linux-x64.tar.gz signature-jenkins-slave-5.1.19-RELEASE/ } function ascend_env_init { # 修改PATH变量,使得~/bin里的可执行文件能被找到 if [[ `cat ~/.bashrc | grep "PATH=~/bin"` == '' ]] then echo "export PATH=~/bin:$PATH" >> ~/.bashrc fi # 临时去掉代理, 保证获取的git mm工具是正确的 if [[ `cat ~/.bashrc | grep "export no_proxy"` == '' ]] then echo "export no_proxy+=,10.141.107.107,.hisilicon.com,.huawei.com" >> ~/.bashrc fi source ~/.bashrc dtc_build #${prds}_modsig_init } function euleros_init { sudo yum install -y \ autoconf automake autogen bc bison bzip2-devel \ cmake elfutils-libelf-devel flex \ gcc gcc-c++ gettext git libffi-devel libtool make \ ncurses openssl-devel openssl pkgconfig python3 python3-devel \ readline readline-devel rpm rpm-build \ samba sqlite-devel tcl tcsh texinfo tk unzip \ xz xz-devel zip zlib-devel sudo yum update } function ubuntu_init { sudo apt update sudo apt install lcov ntp expect unzip curl ntpdate \ lrzsz autoconf libtool nfs-common default-jre \ openssl git libssl-dev bison flex bc libncurses5 \ rpm2cpio build-essential ncurses-dev \ xz-utils libelf-dev cppcheck git gcc python3.8 \ fakeroot pkg-config libglib2.0-dev dos2unix \ libyaml-dev lsb-core automake texinfo gettext unrar zip \ checkinstall libgtk-3-dev \ libexpat1-dev zlib1g-dev libcurl4-gnutls-dev \ libncurses5-dev libreadline-dev help2man \ libncurses-dev apt-file rpm cmake libbz2-dev \ uuid-dev libtinfo-dev libtinfo5 cppcheck-gui \ ubuntu-restricted-extras #sudo apt install linux-headers-5.4.0-42-generic sudo apt upgrade } function tools_init { sudo ln -sf /usr/bin/bash /usr/bin/sh get_osinfo ${osdst}_init git_install python_install ascend_env_init } #echo $# if [[ $# < 2 ]] then echo "Usage: ./monalisa_init.sh operation product" echo " eg: ./monalisa_init.sh init ascend" echo " or: ./monalisa_init.sh update ascend /data/workdir/hi1982" exit 1 fi prds=$2 user_name="" user_email="" rootdir=`pwd` cpua="" osdst="" tools_init if [[ $1 == "init" ]] then code_init if [[ ("${prds}" == "ascend" || "${prds}" == "solomon" || "${prds}" == "DavidV121") && "${osdst}" == "euleros" ]] then echo "====================install numa=======================" sudo yum install numactl-devel sudo yum install numactl-libs cp /usr/lib64/libnuma.so* \ build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so.200.26.0 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so.200 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so.200 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so.200.26.0 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ fi if [[ "${prds}" == "solomon" ]] && [[ "I$br" == "I1" ]] && [[ "${osdst}" == "euleros" ]] then cd $rootdir/tests/kernel/linux-6.6/ git reset --hard bbd3e15c40570df1b4a66f9ac402a07710b7c7ed elif [[ "${prds}" == "DavidV121" ]] then cd $rootdir/open_source/kernel-6.6/ git reset --hard 21636d939ed4956cec36b4eba2fb18b8ad68efab cd $rootdir/drivers/kernel/ git reset --hard 0305b56317cd785db15e2f10cced6916bdba1abc fi exit 0 else pull_codes exit 0 fi
07-18
Linux raspberrypi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Aug 2 22:18:37 2025 from 192.168.163.80 w@raspberrypi:~ $ pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ conda create -n dronepy27 python=2.7 -bash: conda: command not found w@raspberrypi:~ $ conda create -n dronepy27 python=2.7 -bash: conda: command not found w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ ^C w@raspberrypi:~ $ sudo apt-get install python2.7 Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'libpython2.7:armhf' for regex 'python2.7' The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev python-py Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python-py w@raspberrypi:~ $ cd w@raspberrypi:~ $ sudo apt-get install python-pip Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip E: Package 'python-pip' has no installation candidate w@raspberrypi:~ $ sudo apt-get install python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev python-py Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python-py w@raspberrypi:~ $ sudo apt update Hit:1 https://packages.microsoft.com/repos/code stable InRelease Hit:2 http://archive.raspberrypi.com/debian bookworm InRelease Hit:3 http://deb.debian.org/debian bookworm InRelease Hit:4 http://deb.debian.org/debian-security bookworm-security InRelease Get:5 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB] Fetched 55.4 kB in 13s (4,374 B/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 4 packages can be upgraded. Run 'apt list --upgradable' to see them. w@raspberrypi:~ $ sudo apt install python3-pip python3-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done python3-pip is already the newest version (23.0.1+dfsg-1+rpt1). python3-dev is already the newest version (3.11.2-1+b1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo apt install python-is-python3 Reading package lists... Done Building dependency tree... Done Reading state information... Done python-is-python3 is already the newest version (3.11.2-1+deb12u1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ ^C w@raspberrypi:~ $ pip --version pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11) w@raspberrypi:~ $ sudo apt install -y \ > build-essential \ > python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package w@raspberrypi:~ $ sudo apt update sudo apt install -y \ build-essential \ python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Hit:1 https://packages.microsoft.com/repos/code stable InRelease Hit:2 http://deb.debian.org/debian bookworm InRelease Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease Hit:4 http://deb.debian.org/debian bookworm-updates InRelease Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 4 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). libxml2-dev is already the newest version (2.9.14+dfsg-1.3~deb12u2). libxslt1-dev is already the newest version (1.1.35-1+deb12u1). libssl-dev is already the newest version (3.0.17-1~deb12u1). zlib1g-dev is already the newest version (1:1.2.13.dfsg-1+rpt1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libcurl4-gnutls-dev libdeflate-dev libgeos-c1v5 libgeos3.11.1 libjbig-dev libjpeg-dev libjpeg62-turbo-dev liblerc-dev liblzma-dev libproj25 libsqlite3-dev libtiff-dev libtiffxx6 libwebp-dev libzstd-dev proj-data Suggested packages: libcurl4-doc libgnutls28-dev libidn-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libgdal-doc liblzma-doc proj-bin sqlite3-doc The following NEW packages will be installed: libcurl4-gnutls-dev libdeflate-dev libffi-dev libgeos-c1v5 libgeos-dev libgeos3.11.1 libjbig-dev libjpeg-dev libjpeg62-turbo-dev liblerc-dev liblzma-dev libproj-dev libproj25 libsqlite3-dev libtiff-dev libtiffxx6 libwebp-dev libzstd-dev proj-data 0 upgraded, 19 newly installed, 0 to remove and 4 not upgraded. Need to get 11.9 MB of archives. After this operation, 43.5 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian bookworm/main arm64 libcurl4-gnutls-dev arm64 7.88.1-10+deb12u12 [472 kB] Get:2 http://deb.debian.org/debian bookworm/main arm64 libdeflate-dev arm64 1.14-1 [50.0 kB] Get:3 http://deb.debian.org/debian bookworm/main arm64 libffi-dev arm64 3.4.4-1 [56.0 kB] Get:4 http://deb.debian.org/debian bookworm/main arm64 libgeos3.11.1 arm64 3.11.1-1 [683 kB] Get:5 http://deb.debian.org/debian bookworm/main arm64 libgeos-c1v5 arm64 3.11.1-1 [75.6 kB] Get:6 http://deb.debian.org/debian bookworm/main arm64 libgeos-dev arm64 3.11.1-1 [52.4 kB] Get:7 http://deb.debian.org/debian bookworm/main arm64 libjbig-dev arm64 2.1-6.1 [29.9 kB] Get:8 http://deb.debian.org/debian bookworm/main arm64 libjpeg62-turbo-dev arm64 1:2.1.5-2 [292 kB] Get:9 http://deb.debian.org/debian bookworm/main arm64 libjpeg-dev arm64 1:2.1.5-2 [71.8 kB] Get:10 http://deb.debian.org/debian bookworm/main arm64 liblerc-dev arm64 4.0.0+ds-2 [146 kB] Get:11 http://deb.debian.org/debian bookworm/main arm64 liblzma-dev arm64 5.4.1-1 [255 kB] Get:12 http://deb.debian.org/debian bookworm/main arm64 proj-data all 9.1.1-1 [6,212 kB] Get:13 http://deb.debian.org/debian bookworm/main arm64 libproj25 arm64 9.1.1-1+b1 [1,102 kB] Get:14 http://deb.debian.org/debian bookworm/main arm64 libsqlite3-dev arm64 3.40.1-2+deb12u1 [979 kB] Get:15 http://deb.debian.org/debian bookworm/main arm64 libzstd-dev arm64 1.5.4+dfsg2-5 [317 kB] Get:16 http://deb.debian.org/debian bookworm/main arm64 libwebp-dev arm64 1.2.4-0.2+deb12u1 [377 kB] Get:17 http://deb.debian.org/debian bookworm/main arm64 libtiffxx6 arm64 4.5.0-6+deb12u2 [144 kB] Get:18 http://deb.debian.org/debian bookworm/main arm64 libtiff-dev arm64 4.5.0-6+deb12u2 [441 kB] Get:19 http://deb.debian.org/debian bookworm/main arm64 libproj-dev arm64 9.1.1-1+b1 [128 kB] Fetched 11.9 MB in 11min 56s (16.6 kB/s) Selecting previously unselected package libcurl4-gnutls-dev:arm64. (Reading database ... 157355 files and directories currently installed.) Preparing to unpack .../00-libcurl4-gnutls-dev_7.88.1-10+deb12u12_arm64.deb ... Unpacking libcurl4-gnutls-dev:arm64 (7.88.1-10+deb12u12) ... Selecting previously unselected package libdeflate-dev:arm64. Preparing to unpack .../01-libdeflate-dev_1.14-1_arm64.deb ... Unpacking libdeflate-dev:arm64 (1.14-1) ... Selecting previously unselected package libffi-dev:arm64. Preparing to unpack .../02-libffi-dev_3.4.4-1_arm64.deb ... Unpacking libffi-dev:arm64 (3.4.4-1) ... Selecting previously unselected package libgeos3.11.1:arm64. Preparing to unpack .../03-libgeos3.11.1_3.11.1-1_arm64.deb ... Unpacking libgeos3.11.1:arm64 (3.11.1-1) ... Selecting previously unselected package libgeos-c1v5:arm64. Preparing to unpack .../04-libgeos-c1v5_3.11.1-1_arm64.deb ... Unpacking libgeos-c1v5:arm64 (3.11.1-1) ... Selecting previously unselected package libgeos-dev. Preparing to unpack .../05-libgeos-dev_3.11.1-1_arm64.deb ... Unpacking libgeos-dev (3.11.1-1) ... Selecting previously unselected package libjbig-dev:arm64. Preparing to unpack .../06-libjbig-dev_2.1-6.1_arm64.deb ... Unpacking libjbig-dev:arm64 (2.1-6.1) ... Selecting previously unselected package libjpeg62-turbo-dev:arm64. Preparing to unpack .../07-libjpeg62-turbo-dev_1%3a2.1.5-2_arm64.deb ... Unpacking libjpeg62-turbo-dev:arm64 (1:2.1.5-2) ... Selecting previously unselected package libjpeg-dev:arm64. Preparing to unpack .../08-libjpeg-dev_1%3a2.1.5-2_arm64.deb ... Unpacking libjpeg-dev:arm64 (1:2.1.5-2) ... Selecting previously unselected package liblerc-dev:arm64. Preparing to unpack .../09-liblerc-dev_4.0.0+ds-2_arm64.deb ... Unpacking liblerc-dev:arm64 (4.0.0+ds-2) ... Selecting previously unselected package liblzma-dev:arm64. Preparing to unpack .../10-liblzma-dev_5.4.1-1_arm64.deb ... Unpacking liblzma-dev:arm64 (5.4.1-1) ... Selecting previously unselected package proj-data. Preparing to unpack .../11-proj-data_9.1.1-1_all.deb ... Unpacking proj-data (9.1.1-1) ... Selecting previously unselected package libproj25:arm64. Preparing to unpack .../12-libproj25_9.1.1-1+b1_arm64.deb ... Unpacking libproj25:arm64 (9.1.1-1+b1) ... Selecting previously unselected package libsqlite3-dev:arm64. Preparing to unpack .../13-libsqlite3-dev_3.40.1-2+deb12u1_arm64.deb ... Unpacking libsqlite3-dev:arm64 (3.40.1-2+deb12u1) ... Selecting previously unselected package libzstd-dev:arm64. Preparing to unpack .../14-libzstd-dev_1.5.4+dfsg2-5_arm64.deb ... Unpacking libzstd-dev:arm64 (1.5.4+dfsg2-5) ... Selecting previously unselected package libwebp-dev:arm64. Preparing to unpack .../15-libwebp-dev_1.2.4-0.2+deb12u1_arm64.deb ... Unpacking libwebp-dev:arm64 (1.2.4-0.2+deb12u1) ... Selecting previously unselected package libtiffxx6:arm64. Preparing to unpack .../16-libtiffxx6_4.5.0-6+deb12u2_arm64.deb ... Unpacking libtiffxx6:arm64 (4.5.0-6+deb12u2) ... Selecting previously unselected package libtiff-dev:arm64. Preparing to unpack .../17-libtiff-dev_4.5.0-6+deb12u2_arm64.deb ... Unpacking libtiff-dev:arm64 (4.5.0-6+deb12u2) ... Selecting previously unselected package libproj-dev:arm64. Preparing to unpack .../18-libproj-dev_9.1.1-1+b1_arm64.deb ... Unpacking libproj-dev:arm64 (9.1.1-1+b1) ... Setting up libzstd-dev:arm64 (1.5.4+dfsg2-5) ... Setting up proj-data (9.1.1-1) ... Setting up libgeos3.11.1:arm64 (3.11.1-1) ... Setting up libproj25:arm64 (9.1.1-1+b1) ... Setting up libjbig-dev:arm64 (2.1-6.1) ... Setting up libcurl4-gnutls-dev:arm64 (7.88.1-10+deb12u12) ... Setting up libffi-dev:arm64 (3.4.4-1) ... Setting up libwebp-dev:arm64 (1.2.4-0.2+deb12u1) ... Setting up libsqlite3-dev:arm64 (3.40.1-2+deb12u1) ... Setting up libjpeg62-turbo-dev:arm64 (1:2.1.5-2) ... Setting up libgeos-c1v5:arm64 (3.11.1-1) ... Setting up liblerc-dev:arm64 (4.0.0+ds-2) ... Setting up liblzma-dev:arm64 (5.4.1-1) ... Setting up libtiffxx6:arm64 (4.5.0-6+deb12u2) ... Setting up libdeflate-dev:arm64 (1.14-1) ... Setting up libjpeg-dev:arm64 (1:2.1.5-2) ... Setting up libtiff-dev:arm64 (4.5.0-6+deb12u2) ... Setting up libgeos-dev (3.11.1-1) ... Setting up libproj-dev:arm64 (9.1.1-1+b1) ... Processing triggers for man-db (2.11.2-2) ... Processing triggers for libc-bin (2.36-9+rpt2+deb12u12) ... w@raspberrypi:~ $ sudo apt install python3-dronekit Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-dronekit w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo pip3 install --no-cache-dir dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo apt install -y build-essential python3-dev python3-venv Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). python3-venv is already the newest version (3.11.2-1+b1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ python3 -m venv --system-site-packages ~/dronekit_safe_env w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade pip setuptools wheel cython Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pip in ./dronekit_safe_env/lib/python3.11/site-packages (23.0.1) Collecting pip Downloading pip-25.2-py3-none-any.whl (1.8 MB) ━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 21.6 kB/s eta 0:00:00 Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (66.1.1) Collecting setuptools Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 23.3 kB/s eta 0:00:00 Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (0.38.4) Collecting wheel Downloading https://www.piwheels.org/simple/wheel/wheel-0.45.1-py3-none-any.whl (72 kB) ━━━━━━━━━━━━━━━━━━ 72.5/72.5 kB 119.9 kB/s eta 0:00:00 Collecting cython Downloading cython-3.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB) ━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 24.2 kB/s eta 0:00:00 Installing collected packages: wheel, setuptools, pip, cython Attempting uninstall: wheel Found existing installation: wheel 0.38.4 Not uninstalling wheel at /usr/lib/python3/dist-packages, outside environment /home/w/dronekit_safe_env Can't uninstall 'wheel'. No files were found to uninstall. Attempting uninstall: setuptools Found existing installation: setuptools 66.1.1 Uninstalling setuptools-66.1.1: Successfully uninstalled setuptools-66.1.1 Attempting uninstall: pip Found existing installation: pip 23.0.1 Uninstalling pip-23.0.1: Successfully uninstalled pip-23.0.1 Successfully installed cython-3.1.2 pip-25.2 setuptools-80.9.0 wheel-0.45.1 (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': cd pymavlink Password for 'https://cd%20pymavlink@github.com': remote: Invalid username or token. Password authentication is not supported for Git operations. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git cd pymavlink python setup.py bdist_wheel pip install dist/pymavlink-*.whl --no-cache-dir cd .. Cloning into 'pymavlink'... Username for 'https://github.com': Password for 'https://github.com': remote: Repository not found. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' -bash: cd: pymavlink: No such file or directory python: can't open file '/home/w/setup.py': [Errno 2] No such file or directory WARNING: Requirement 'dist/pymavlink-*.whl' looks like a filename, but the file does not exist ERROR: Invalid wheel filename (wrong number of parts): 'pymavlink-*' (dronekit_safe_env) w@raspberrypi:/home $ git clone https://github.com/mavlink/pymavlink.git fatal: could not create work tree dir 'pymavlink': Permission denied (dronekit_safe_env) w@raspberrypi:/home $ cd ~ (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': cd pymavlink Password for 'https://cd%20pymavlink@github.com': (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': ^[[D^[[D^[[D^[[D^[[D^[[D^[[D^^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3^[[C^[[C^[[C^[[C^C (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': w Password for 'https://w@github.com': remote: Invalid username or token. Password authentication is not supported for Git operations. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' (dronekit_safe_env) w@raspberrypi:~ $ rm -rf pymavlink (dronekit_safe_env) w@raspberrypi:~ $ sudo apt install -y \ build-essential \ python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). libxml2-dev is already the newest version (2.9.14+dfsg-1.3~deb12u2). libxslt1-dev is already the newest version (1.1.35-1+deb12u1). libgeos-dev is already the newest version (3.11.1-1). libproj-dev is already the newest version (9.1.1-1+b1). libssl-dev is already the newest version (3.0.17-1~deb12u1). zlib1g-dev is already the newest version (1:1.2.13.dfsg-1+rpt1). libffi-dev is already the newest version (3.4.4-1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ sudo apt install python3-dronekit Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-dronekit (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir Cython numpy error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/wheel/ WARNING: Error parsing dependencies of send2trash: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier sys-platform (=="darwin") ; extra == 'objc' ~^ (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) WARNING: Error parsing dependencies of send2trash: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier sys-platform (=="darwin") ; extra == 'objc' ~^ (dronekit_safe_env) w@raspberrypi:~ $ python3 -m venv ~/dronekit_safe_env (dronekit_safe_env) w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --upgrade pip setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pip in ./dronekit_safe_env/lib/python3.11/site-packages (25.2) Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) (dronekit_safe_env) w@raspberrypi:~ $ pip list | grep -E "setuptools|wheel" setuptools 80.9.0 wheel 0.45.1 (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir Cython numpy error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ ssh-keygen -t ed25519 -C "your_email@example.com" Generating public/private ed25519 key pair. Enter file in which to save the key (/home/w/.ssh/id_ed25519): ssh-keygen -t ed25519 -C "your_email@example.com"^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[ Created directory '/home/w/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/w/.ssh/id_ed25519 Your public key has been saved in /home/w/.ssh/id_ed25519.pub The key fingerprint is: SHA256:siXsZrFdnFoU/noUOttztnIy32zE0lVdCmymQJSVpfs your_email@example.com The key's randomart image is: +--[ED25519 256]--+ | oooo+o +| | o..o+. .o| | .++. . .| | . o.= . .| | = S O o o.| | . O + B . +| | * o o E oo | | o .++.+.| | *o.o| +----[SHA256]-----+ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ (dronekit_safe_env) w@raspberrypi:~ $ ssh-keygen -t ed25519 -C "2011595779@qq.com" Generating public/private ed25519 key pair. Enter file in which to save the key (/home/w/.ssh/id_ed25519): /home/w/.ssh/id_ed25519 already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/w/.ssh/id_ed25519 Your public key has been saved in /home/w/.ssh/id_ed25519.pub The key fingerprint is: SHA256:f20VoIwPrfQAjKttlC+ZAdS5lduB6CB2ZUm8aEB25qM 2011595779@qq.com The key's randomart image is: +--[ED25519 256]--+ |.o.+=+*.o . | |.+++.B =..+ . . | |. +o= * o=.+ . | | .o.O ...* .| | E. + = S. o .| | . * . . . . | | . . . . o | | . . | | | +----[SHA256]-----+ (dronekit_safe_env) w@raspberrypi:~ $ eval "$(ssh-agent -s)" Agent pid 3357 (dronekit_safe_env) w@raspberrypi:~ $ cat ~/.ssh/id_ed25519.pub ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN5PMRTtM9ADoHHWnKG/A4bPdySkravBSTdhP17IgCS 2011595779@qq.com (dronekit_safe_env) w@raspberrypi:~ $ ssh -T git@github.com The authenticity of host 'github.com (20.205.243.166)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'github.com' (ED25519) to the list of known hosts. git@github.com: Permission denied (publickey). (dronekit_safe_env) w@raspberrypi:~ $ ^C (dronekit_safe_env) w@raspberrypi:~ $
最新发布
08-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值