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命令

相关推荐
现任明教教主~1 小时前
Thinkphp站群蜘蛛池SaaS系统YanyvSEO含多用户/积分/六大引擎计费/易支付对接
java·开发语言·spring
Zhou1411362 小时前
SpringSecurity_02_授权与高级功能
开发语言·python
码匠许师傅2 小时前
【C++三方组件】cpp-httplib:一个头文件起 HTTP 服务
开发语言·c++·http
小小小小钰儿3 小时前
1.5-Python网络编程
开发语言·网络·python·web安全·计算机·网络安全
hiahiahia1233 小时前
实现完整 Tool Dispatcher
开发语言·前端
AC赳赳老秦4 小时前
公开音频转写信息提取:OpenClaw 处理发布会与听证会文本并提取核心决策信息
大数据·开发语言·汇编·数据库·人工智能·deepseek·openclaw
@yanyu6664 小时前
C编译器安装与第一个C程序
c语言·开发语言
落魄实习生4 小时前
Agent Scope Java 2.x 系列【2】 ReActAgent
java·开发语言