ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.12k stars 9.7k forks source link

apollo安装aem,不能正常使用。需要手动ln -s 软链接到/bin/aem,才能使用。不知道会不会有其它问题? #14779

Open lurenhua0122 opened 1 year ago

lurenhua0122 commented 1 year ago

问题描述:能够正常安装,但无法使用aem -h 等命令,经过分析排查,可能是link 文件到/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry/apollo-env-manager.sh出现的问题。我可以使用全称进行命令的使用,但不知道会不会其它问题的出现。

工作环境

解决办法:通过软件链接的办法解决

#ln -s 源文档 目标文档 
#下面的1.0.0.3是版本号,你最后安装的,我解决的时候还有一个1.0.0.1的版本,没有使用

ln -s /bin/aem /opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry/apollo-env-manager.sh

Steps to reproduce the issue:

(base) aiton@aiton-PowerEdge-R720:~$ sudo apt update
获取:1 file:/var/cuda-repo-ubuntu1804-11-8-local  InRelease [1,575 B]
获取:2 file:/var/cudnn-local-repo-ubuntu1804-8.6.0.163  InRelease [1,575 B]
获取:1 file:/var/cuda-repo-ubuntu1804-11-8-local  InRelease [1,575 B]          
获取:2 file:/var/cudnn-local-repo-ubuntu1804-8.6.0.163  InRelease [1,575 B]    
命中:3 https://apollo-pkg-beta.cdn.bcebos.com/neo/beta bionic InRelease        
命中:4 http://security.ubuntu.com/ubuntu bionic-security InRelease             
命中:5 http://cn.archive.ubuntu.com/ubuntu bionic InRelease                    
命中:6 https://download.docker.com/linux/ubuntu bionic InRelease               
命中:7 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease            
命中:8 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease          
命中:9 https://linux.teamviewer.com/deb stable InRelease                       
命中:10 http://packages.microsoft.com/repos/code stable InRelease              
命中:11 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease
正在读取软件包列表... 完成                    
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 4 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
N: 鉴于仓库 'https://apollo-pkg-beta.cdn.bcebos.com/neo/beta bionic InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
(base) aiton@aiton-PowerEdge-R720:~$ sudo vim /etc/apt/sources.list
(base) aiton@aiton-PowerEdge-R720:~$ sudo apt update
获取:1 file:/var/cuda-repo-ubuntu1804-11-8-local  InRelease [1,575 B]
获取:2 file:/var/cudnn-local-repo-ubuntu1804-8.6.0.163  InRelease [1,575 B]
获取:1 file:/var/cuda-repo-ubuntu1804-11-8-local  InRelease [1,575 B]          
获取:2 file:/var/cudnn-local-repo-ubuntu1804-8.6.0.163  InRelease [1,575 B]    
命中:3 http://cn.archive.ubuntu.com/ubuntu bionic InRelease                    
命中:4 https://apollo-pkg-beta.cdn.bcebos.com/neo/beta bionic InRelease        
命中:5 http://packages.microsoft.com/repos/code stable InRelease               
命中:6 http://security.ubuntu.com/ubuntu bionic-security InRelease             
命中:7 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease            
命中:8 https://linux.teamviewer.com/deb stable InRelease                       
命中:9 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease          
命中:10 https://download.docker.com/linux/ubuntu bionic InRelease
命中:11 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease
正在读取软件包列表... 完成                                                     
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 4 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
(base) aiton@aiton-PowerEdge-R720:~$ sudo apt install apollo-neo-env-manager-dev正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
apollo-neo-env-manager-dev 已经是最新版 (1.0.0.3)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
(base) aiton@aiton-PowerEdge-R720:~$ aem -h

Command 'aem' not found, did you mean:

  command 'rem' from snap rem (0.16.2)
  command 'gem' from snap ruby (3.2.0)
  command 'sem' from deb parallel
  command 'acm' from deb acm
  command 'pem' from deb pem
  command 'gem' from deb ruby
  command 'aec' from deb libaec-tools
  command 'aewm' from deb aewm
  command 'aim' from deb abinit
  command 'apm' from deb apmd
  command 'rem' from deb remind

See 'snap info <snapname>' for additional versions.
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ls
apollo-env-manager.sh
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ./apollo-env-manager.sh 

Usage:
    aem [OPTION]

Options:
    build : build package in workspace.
    stop : stop all apollo development container.
    install : install source code of specified package to workspace.
    start : start a docker container with apollo development image.
    init : init single workspace.
    bootstrap : run dreamview and monitor module.
    enter : enter into the apollo development container.
    update : update core modules of apollo.
    start_gpu : start a docker container with apollo gpu support development image.
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ./apollo-env-manager.sh  -h

Usage:
    aem [OPTION]

Options:
    build : build package in workspace.
    stop : stop all apollo development container.
    install : install source code of specified package to workspace.
    start : start a docker container with apollo development image.
    init : init single workspace.
    bootstrap : run dreamview and monitor module.
    enter : enter into the apollo development container.
    update : update core modules of apollo.
    start_gpu : start a docker container with apollo gpu support development image.
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ./apollo-env-manager.sh  enter
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ 58a2f47625bb is not running
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ 
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ 
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ 
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ./apollo-env-manager.sh start_gpu
[INFO] Determine whether host GPU is available ...
[INFO] USE_GPU_HOST: 1
[INFO] Start pulling docker image registry.baidubce.com/apollo/apollo-env-gpu:latest ...
latest: Pulling from apollo/apollo-env-gpu
a404e5416296: Pull complete 
391d07dd0009: Pull complete 
cb7a4dc5cae3: Pull complete 
3f77a3e2807d: Pull complete 
0f0ed9680ff1: Pull complete 
e2250e4b9e64: Pull complete 
9cf40c59065f: Pull complete 
2948bd655f12: Pull complete 
c27dc09446dd: Pull complete 
63b1390284bb: Pull complete 
53f7b27ef6e5: Pull complete 
25e39f767953: Pull complete 
44486793ab39: Pull complete 
1ded34c9631d: Pull complete 
437e09f100ec: Pull complete 
57156d1411e5: Pull complete 
7a8fb689c7c4: Pull complete 
514a9638fc56: Pull complete 
c5887e20e3ce: Pull complete 
99a4548f8a59: Pull complete 
3ebe9c6bf67c: Pull complete 
4a048602d29b: Pull complete 
8065ed582acd: Pull complete 
11a0cf8c0422: Pull complete 
6ab72c3fd4ee: Pull complete 
d60f74aef49e: Pull complete 
6508659afe4e: Pull complete 
7d77ccf2bc09: Pull complete 
604657e20775: Pull complete 
Digest: sha256:db4dcc8f98ca82cc36596b59dbeef03eb6fce3bd01bd8289c4c697c696ae75b1
Status: Downloaded newer image for registry.baidubce.com/apollo/apollo-env-gpu:latest
registry.baidubce.com/apollo/apollo-env-gpu:latest
[INFO] apollo_neo_dev_aiton is down, try to restart.
apollo_neo_dev_aiton
[ OK ] apollo_neo_dev_aiton successfully restart, please run the following command:
[ OK ]     aem enter
[ OK ] Enjoy!
(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ aem enter

Command 'aem' not found, did you mean:

  command 'gem' from snap ruby (3.2.0)
  command 'rem' from snap rem (0.16.2)
  command 'sem' from deb parallel
  command 'aim' from deb abinit
  command 'pem' from deb pem
  command 'acm' from deb acm
  command 'aewm' from deb aewm
  command 'rem' from deb remind
  command 'apm' from deb apmd
  command 'aec' from deb libaec-tools
  command 'gem' from deb ruby

See 'snap info <snapname>' for additional versions.

(base) aiton@aiton-PowerEdge-R720:/opt/apollo/neo/packages/env-manager-dev/1.0.0.3/entry$ ./apollo-env-manager.sh enter
aiton@in-dev-docker:/apollo_workspace$ ls
WORKSPACE               bazel-bin  bazel-testlogs  demo_3.5.record  example_components  planning_customization  sensor_rgb.tar.xz    third_party
bazel-apollo_workspace  bazel-out  data            dev              modules             scripts                 sensor_rgb.tar.xz.1  tools
aiton@in-dev-docker:/apollo_workspace$ pwd
/apollo_workspace
aiton@in-dev-docker:/apollo_workspace$ ls
WORKSPACE               bazel-bin  bazel-testlogs  demo_3.5.record  example_components  planning_customization  sensor_rgb.tar.xz    third_party
bazel-apollo_workspace  bazel-out  data            dev              modules             scripts                 sensor_rgb.tar.xz.1  tools
aiton@in-dev-docker:/apollo_workspace$  
WildBeast114514 commented 1 year ago

在 aem 的 postinst 中,有一步是将 apollo-env-manager.sh 软链到 /usr/local/bin 下,看起来是这一步没有执行成功,使用全称和手动链接能够使用的话说明aem已经成功安装并且正常使用了

如果可以的话能不能重装一遍 aem 并把 apt 的 log 发到这个 issue 中吗?方便我们排查下具体问题