Say we have installed qt programs and we want to run qtcreator from the command line.

What we need here is only to put a soft link to the qtcreator we have just installed. Here are some simple precedures.

  1. Once the Qt program is installed, open up a terminal and use a text editor such as nano or gedit to edit your /etc/profile.

    • Type/Copy/Paste: sudo -s nano /etc/profile
    • or
    • Type/Copy/Paste: sudo -s gedit /etc/profile
     
  2. Scroll down to the end of the /etc/profile file and enter the following text below. You want to add this line below to your /etc/profile system wide file so that you will have the option to compile Qt programs from the terminal line.
     
  3. Type/Copy/Paste:
    • PATH=/opt/Qt5.7.0/Tools/QtCreator/bin:$PATH
    • export PATH
     
  4. The above number highlighted in bold denotes the version number of the Qt SDK so make sure you enter the correct version number of the Qt SDK. The Qt SDK is always improving with new version changes. So make sure you are mindful of your Qt SDK version number.
    • For example, we are using Qt version 5.7.0 in this example, therefore the version number in the /etc/profile would reflect as 5.7.0
     
  5. Save the /etc/profile file and exit
     
  6. Reload the /etc/profile file by issuing the following command
    • Type/Copy/Paste: . /etc/profile
    • Make sure you enter a . and then a space in order to reload your /etc/profile file
     
  7. Once the /etc/profile file is reloaded issue the following command you can type the following commands to make sure your Ubuntu Linux system recognizes that the Qt SDK has been accepted by the system PATH.
     
  8. Type/Copy/Paste: which qtcreator
    • You should receive a response such as the one below
    • /opt/Qt5.7.0/Tools/QtCreator/bin/qtcreator
     
  9. Also type the following command below:
    • Type/Copy/Paste: qtcreator -version
     
  10. You should receive a response similar to this:
    • Qt Creator 4.0.2 based on Qt 5.7.0
     
  11. This lets you know that you are able to run qtcreator programs from the command line.

How to run an manually installed program from terminals in Linux / Ubuntu的更多相关文章

  1. /dev/sda3: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

    系统强制断电后,出现以下错误: /dev/sda3: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY 启动系统后在字符界面有两个选项,输入root密码进入维护模 ...

  2. run fsck manually

    就出现unexpected inconsistency run fsck manually这个问题了. 磁盘出问题,需要用 Fsck修复... 解决方案: 在命令行输入#mount | grep ”o ...

  3. Linux启动提示“unexpected inconsistency;RUN fsck MANUALLY”

    问题:在开机启动时,提示“unexpected inconsistency;RUN fsck MANUALLY”进不了系统 解决方法: fsck不仅可以对文件系统进行扫描,还能修正文件系统的一些问题, ...

  4. CentOS 启动提示unexpected inconsistency;RUN fsck MANUALLY

    CentOS这两天服务器出了问题了,提示如下: unexpected inconsistency;RUN fsck MANUALLY An error occurred during the file ...

  5. CentOS 用挂了dev/sda1:UNEXPECTED INCONSISTENCY;RUN fsck MANUALLY .

    dev/sda1:UNEXPECTED INCONSISTENCY;RUN fsck MANUALLY .(i.e. ,without -a or -p options)fsck died with ...

  6. centos启动提示unexpected inconsistency RUN fsck MANUALLY

    今天一台虚拟机背后的物理机故障了,主机迁移后变成了 read only filesystem.上面部署了很多长连接服务,没有关掉就直接reboot,报错: unexpected inconsisten ...

  7. CentOS 启动提示unexpected inconsistency;RUN fsck MANUALLY, ntfs的input/output Error,InPageError c000009c使用chkdsk修复磁盘,12款Linux系统恢复工具

    CentOS这两天服务器出了问题了,提示如下: unexpected inconsistency;RUN fsck MANUALLY An error occurred during the file ...

  8. docker Failed to get D-Bus connection 报错 docker run -e MYVAR1 --env MYVAR2=foo --env-file ./env.list ubuntu bash

    docker Failed to get D-Bus connection 报错 原创憬薇2016-01-15 11:25:26评论(10)40278人阅读   在centos7的容器里面出现了一个B ...

  9. How to create a launcher for a manually extracted program in Ubuntu

    Say we have a latest Blender extracted from the download package. We want to create a launcher for B ...

随机推荐

  1. android 项目学习随笔十六( 广告轮播条播放)

    广告轮播条播放 if (mHandler == null) {//在此初始化mHandler , 保证消息不重复发送 mHandler = new Handler() { public void ha ...

  2. Mac下使用Automator实现隐藏和显示

    本文使用Makdown编辑 通常系统中打开一个文件有好多种方法,编辑也是.例如你要打开OmniGraffle来画个图(suppose you are working on the Mac OS X) ...

  3. C# csv 操作类

    using System.Data; using System.IO; using System.Text; namespace YanZhiwei.DotNet2.Utilities.Common ...

  4. Serializable接口使用纪实

    这两天依领导要求使用sonar工具测试了一下项目代码,其中有一个问题是 而这个类的结构大概是这样的: public class Demo<T> implements Serializabl ...

  5. Viewpaer+fragment

    1.碎片的动态切换: 1-1:页面填写 <FrameLayout android:id="@+id/fl_layout" android:layout_weight=&quo ...

  6. jQuery 禁用退格键

    在只读区域按退格键会造成页面后退,禁用退格键可以这样做: $(document).bind("keydown", function(e){ if(e.keyCode == 8){/ ...

  7. 关于Java中的GUI事件处理

    关于事件监听的实现过程通过下面的代码来具体说明: package com.sxt; import java.awt.BorderLayout; import java.awt.event.Action ...

  8. MVC模式(Model View Controller)下实现数据库的连接,对数据的删,查操作

    MVC模式(Model View Controller): Model:DAO模型 View:JSP  在页面上填写java代码实现显示 Controller:Servlet 重定向和请求的转发: 若 ...

  9. Find them, Catch them

    Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 36488 Accepted: 111 ...

  10. 关于AnimationState的测试

    修改time信息并不会立马生效,动画信息修改是在这一帧结束统一执行的. 当normalizedTime设置为0-1之外的值时,值并不会被约束回0-1范围,而动画会被约束播放到0-1之间的位置