ubuntu libtool_args+=: not found 解决办法

本文介绍了解决在Ubuntu环境下编译OpenCV2.0时遇到的libtool相关错误的方法。主要原因是默认shell从dash指向了bash,提供了两种解决方案。

今天编译opencv2.0的时候,make  后遇到如下情况:

libtool eval: 1: libtool_args+=: not found
libtool eval: 1: libtool_args+=: not found
libtool eval: 1: compile_command+=: not found
libtool eval: 1: finalize_command+=: not found
libtool eval: 1: libtool_args+=: not found
libtool eval: 1: compile_command+=: not found
libtool eval: 1: finalize_command+=: not found
libtool eval: 1: libtool_args+=: not found
libtool eval: 1: compile_command+=: not found

。。。

多方查证,发现是bin/sh->dash,ubuntu    sh默认的是连接到dash,

解决方法两种:

   (1)、bin/sh->bin/bash(sudo rm /bin/sh; cd /bin; ln -s bash sh)

   (2)、文件里SHELL修改为bin/bash

已完成(A) lqx@lqx:~/PyCharmMiscProject$ pip uninstall pyzmq -y Found existing installation: pyzmq 27.1.0 Uninstalling pyzmq-27.1.0: Successfully uninstalled pyzmq-27.1.0 (A) lqx@lqx:~/PyCharmMiscProject$ (A) lqx@lqx:~/PyCharmMiscProject$ sudo apt-get update [sudo] lqx 的密码: 命中:1 http://security.ubuntu.com/ubuntu focal-security InRelease 命中:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease 命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease 命中:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease 正在读取软件包列表... 完成 (A) lqx@lqx:~/PyCharmMiscProject$ sudo apt-get install libzmq3-dev 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 libzmq3-dev 已经是最新版 (4.3.2-2ubuntu1)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 261 个软件包未被升级。 (A) lqx@lqx:~/PyCharmMiscProject$ pip install pyzmq --force-reinstall --no-binary pyzmq Collecting pyzmq Using cached pyzmq-27.1.0-cp38-cp38-linux_x86_64.whl Installing collected packages: pyzmq Successfully installed pyzmq-27.1.0 [notice] A new release of pip is available: 24.3.1 -> 25.0.1 [notice] To update, run: pip install --upgrade pip,仍存在/home/lqx/anaconda3/envs/A/bin/python /home/lqx/桌面/OpenCastKit-master/OpenCastKit-master/train_graphcast.py /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/fast_multihead_attention.py:64: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead. @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/fast_multihead_attention.py:488: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead. def backward(ctx, grad_output2, grad_weight): /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/hf_norm.py:23: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead. @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/hf_norm.py:57: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead. def backward(ctx, dy): 非集群环境 Traceback (most recent call last): File "/home/lqx/桌面/OpenCastKit-master/OpenCastKit-master/train_graphcast.py", line 11, in <module> import hfai.nccl.distributed as dist File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nccl/distributed/__init__.py", line 13, in <module> import zmq File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/__init__.py", line 52, in <module> from zmq import backend File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/__init__.py", line 30, in <module> raise original_error from None File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/__init__.py", line 25, in <module> _ns = select_backend(first) File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/select.py", line 31, in select_backend mod = import_module(name) File "/home/lqx/anaconda3/envs/A/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/cython/__init__.py", line 6, in <module> from . import _zmq File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/cython/_zmq.py", line 34, in <module> raise ImportError(msg) ImportError: Attempting to import zmq Cython backend, which has not been compiled. This probably means you are importing zmq from its source tree. if this is what you want, make sure to do an in-place build first: pip install -e '/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages' If it is not, then '/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages' is probably on your sys.path, when it shouldn't be. Is that your current working directory? If neither of those is true and this file is actually installed, something seems to have gone wrong with the install! Please report at https://github.com/zeromq/pyzmq/issues 进程已结束,退出代码为 1
12-08
/home/lqx/anaconda3/envs/A/bin/python /home/lqx/桌面/OpenCastKit-master/OpenCastKit-master/train_graphcast.py /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/fast_multihead_attention.py:64: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead. @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/fast_multihead_attention.py:488: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead. def backward(ctx, grad_output2, grad_weight): /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/hf_norm.py:23: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead. @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) /home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nn/modules/hf_norm.py:57: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead. def backward(ctx, dy): 非集群环境 Traceback (most recent call last): File "/home/lqx/桌面/OpenCastKit-master/OpenCastKit-master/train_graphcast.py", line 11, in <module> import hfai.nccl.distributed as dist File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/hfai/nccl/distributed/__init__.py", line 13, in <module> import zmq File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/__init__.py", line 52, in <module> from zmq import backend File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/__init__.py", line 30, in <module> raise original_error from None File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/__init__.py", line 25, in <module> _ns = select_backend(first) File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/select.py", line 31, in select_backend mod = import_module(name) File "/home/lqx/anaconda3/envs/A/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/cython/__init__.py", line 6, in <module> from . import _zmq File "/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages/zmq/backend/cython/_zmq.py", line 34, in <module> raise ImportError(msg) ImportError: Attempting to import zmq Cython backend, which has not been compiled. This probably means you are importing zmq from its source tree. if this is what you want, make sure to do an in-place build first: pip install -e '/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages' If it is not, then '/home/lqx/anaconda3/envs/A/lib/python3.8/site-packages' is probably on your sys.path, when it shouldn't be. Is that your current working directory? If neither of those is true and this file is actually installed, something seems to have gone wrong with the install! Please report at https://github.com/zeromq/pyzmq/issues 进程已结束,退出代码为 1 问题依旧存在
最新发布
12-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值