bash: ../configure: /bin/sh^M: bad interpreter: No such file or directory

bash: ../configure: /bin/sh^M: bad interpreter: No such file or directory

这个错误通常是由于Windows平台下的文本格式导致的,而在Linux下则会被解释为错误。解决这个问题的方法之一是使用dos2unix命令将脚本转换为Unix格式。

dos2unix ../configure

然后重新运行配置步骤:

../configure \ -opensource \ -confirm-license \ -release \ -prefix /usr/local/Qt \ -nomake examples \ -nomake tests

Creating qmake... .g++: error: unrecognized debug output level '\x0d' '; did you mean '-fdata-sections'? make: *** [Makefile:250: main.o] Error 1

这也是由于在windows平台下执行Linux编译的文本格式错误 (一般是因为用了虚拟机) 解决方法是

在 Qt 源码的根目录下运行以下命令:

find /home/ubuntu2004/qt-everywhere-src-5.15.8 -type f -exec dos2unix {} \;

递归清理其中的文本格式问题

然后重新运行./configure命令

相关推荐
Rsun045512 分钟前
10、Java 桥接模式从入门到实战
java·开发语言·桥接模式
jieyucx11 分钟前
Golang 完整安装与 VSCode 开发环境搭建教程
开发语言·vscode·golang
pearlthriving13 分钟前
c++当中的泛型思想以及c++11部分新特性
java·开发语言·c++
智慧地球(AI·Earth)22 分钟前
规则引擎实战:Python中re库和pyknow库规则引擎实战教程
开发语言·python·程序人生
小雅痞1 小时前
[Java][Leetcode hard] 42. 接雨水
java·开发语言·leetcode
We་ct1 小时前
AI辅助开发术语体系深度剖析
开发语言·前端·人工智能·ai·ai编程
t***5441 小时前
Dev-C++中哪些选项可以设置
开发语言·c++
輕華1 小时前
PyQt5入门实战:安装、QtDesigner设计与PyUIC转换完整指南
开发语言·qt
麻辣璐璐1 小时前
EditText属性运用之适配RTL语言和LTR语言的输入习惯
android·xml·java·开发语言·安卓
2301_803554522 小时前
C++ 并发核心:std::promise、std::future、std::async 超详细全解
开发语言·c++