Ubuntu下安装与卸载Qt - 日理万妓 2023-06-18 06:56 2阅读 0赞 # ***安装 Qt:*** # 第一步:到官网[http://download.qt.io/archive/qt/][http_download.qt.io_archive_qt]下载 Qt 安装包,此处本人安装的是 **qt-opensource-linux-x64-5.7.0.run**; 第二步:打开终端,输入命令:“**sudo chmod -R 777 qt-opensource-linux-x64-5.7.0.run**”,赋予安装包权限; 第三步:开始安装 Qt,输入命令“**./qt-opensource-linux-x64-5.7.0.run**”或者“**sudo ./qt-opensource-linux-x64-5.7.0.run**”,两者的区别在于,一个是将 Qt 默认安装在 home 目录下,后者是将 Qt 安装在根目录/opt 下,当然你也可以在图形界面安装过程中自行设置安装路径(我是使用第一条命令,并且自定义安装的路径): ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70][] 第四步:根据弹出的窗口,按照提示,一直点击 next,再点击 skip,之后一直点击 next,直到这一步,注意,如图,将所有选项打“√”,点击 next,即可,然后等待安装; **最后,不要运行QT。** ***配置 Qt 环境:*** ***输入如下命令:*** 第一步:Qt 安装完成后,先别打开,因为还需要安装其他工具以及库文件。 第二步:打开终端,键入命令“**sudo apt-get install gcc g++**”,安装 linux 下编程的编译器; 第三步:再输入命令“**sudo apt-get install libqt4-dev**”,不然编译时会出现错误“**cannot find -lgl**”; 第四步:再输入命令“**sudo apt-get install build-essential**”,这是一个编译工具,它可以使得我们的程序知道头文件和库函数放在哪个位置; 修改系统默认的QT:[https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/103143616][https_blog.csdn.net_zhuiqiuzhuoyue583_article_details_103143616] 参考:[https://www.jianshu.com/p/7dad1a4483b][https_www.jianshu.com_p_7dad1a4483b] [ ][https_www.jianshu.com_p_7dad1a4483b][ https://blog.csdn.net/jcs1992/article/details/81506880][_ https_blog.csdn.net_jcs1992_article_details_81506880] [https://blog.csdn.net/kenjianqi1647/article/details/80151932][https_blog.csdn.net_kenjianqi1647_article_details_80151932] # 卸载有2种办法 # ### 1.进入qt的安装目录下卸载 ### 一般ubuntu软件是安装在opt目录下,如果不在就需要找找了 进入安装目录下 sudo ./MaintenanceTool ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70 1][] ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70 2][] 选择remove all 就可以完全删除qt了 ### 2.命令行安装的卸载 ### sudo apt-get remove qt5-default qtcreator 参考:[https://blog.csdn.net/weixin\_41012767/article/details/89399108][https_blog.csdn.net_weixin_41012767_article_details_89399108] [http_download.qt.io_archive_qt]: https://link.jianshu.com?t=http%3A%2F%2Fdownload.qt.io%2Farchive%2Fqt%2F [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70]: https://img-blog.csdnimg.cn/20191130230948388.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz,size_16,color_FFFFFF,t_70 [https_blog.csdn.net_zhuiqiuzhuoyue583_article_details_103143616]: https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/103143616 [https_www.jianshu.com_p_7dad1a4483b]: https://www.jianshu.com/p/7dad1a4483bd [_ https_blog.csdn.net_jcs1992_article_details_81506880]: https://blog.csdn.net/jcs1992/article/details/81506880 [https_blog.csdn.net_kenjianqi1647_article_details_80151932]: https://blog.csdn.net/kenjianqi1647/article/details/80151932 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70 1]: https://img-blog.csdnimg.cn/20191130215326798.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz,size_16,color_FFFFFF,t_70 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz_size_16_color_FFFFFF_t_70 2]: https://img-blog.csdnimg.cn/20191130215410935.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3podWlxaXV6aHVveXVlNTgz,size_16,color_FFFFFF,t_70 [https_blog.csdn.net_weixin_41012767_article_details_89399108]: https://blog.csdn.net/weixin_41012767/article/details/89399108
还没有评论,来说两句吧...