1

I have a folder containing files main.cc main.o Makefile prog prog.pro and prog.pro.user I have problem installing it. This is a program that someone wrote, and it is not available in public as a .deb file. I used the following commands:

  1. make resulted in: make: Nothing to be done for 'first'.
  2. install resulted in: install: missing file operand.
  3. prog resulted in: prog: command not found
  4. ./prog resulted in: QFSFileEngine::open: No file name specified The device must be readable. Error loading the info.xml file
  5. sudo make && make install resulted in:make: *** No rule to make target '../../../../anaconda/mkspecs/linux-g++/qmake.conf, needed by 'Makefile'. Stop.
  6. ./configure resulted in: bash: ./configure: No such file or directory

I also right clicked on prog, and clicked on Run. but nothing is happening.

Could you please guide me on how to fix this?

  • 2
    Can you tell us what the application is you're trying to install? Usually it's the same or similar enough, but it may be different - so there's not necessarily a 'one size fits all' answer. Provide more detail, and we should be able to help you. ;) – gravity Jun 22 '16 at 16:01
  • 1
    Can you also clarify what you mean by "they didn't work" ? What exactly didn't work ? What was the output of these commands ? – JonasCz - Reinstate Monica Jun 22 '16 at 16:08
  • prog.pro : Just run qmake .... or qmake -o Makefile prog.pro .... I.e. qmake will generate a new Makefile from prog.pro – Knud Larsen Jun 22 '16 at 16:38
  • I did "qmake -o Makefile prog.pro" a new Makefile from prog.pro created. now how can i run the program? – Samira Afzal Jun 22 '16 at 16:52
  • I don't understand why this question is being downvoted, as the question states: his is a program that someone wrote, and it is not in public – eyoung100 Jun 22 '16 at 18:06
2

Compiling Software on Ubuntu requires a few extra steps, as most packages come as precompiled binaries available in the software store or in your version's repository. Following these steps as a guideline will ensure that you can compile software easily:

  1. Let's create a place for our software to live. This ensures that we do not affect our running system, should something go wrong. The guide linked below uses /usr/local/src, but I prefer /opt: sudo mkdir /opt/ProgramName. Replace ProgramName with the actual name of the compiled program.
  2. Move all the Items that you're trying to compile into /opt/ProgramName, or better yet move and extract the Tarball into /opt/ProgramName: mv -v tarballname.tar.gz /opt/ProgramName && cd /opt/ProgramName/ && tar -xzvf tarballname.tar.gz
  3. With a fresh copy of the tarball extracted, we need some tools, namely the compiler, the make, and the install program: sudo apt-get install build-essential checkinstall
  4. Run ./configure --prefix=/opt/ProgramName in the root directory, ProgramName. The --prefix parameter is very important, as this tells make not to install this in your system's default directories. This also tells you that the package is not managed by apt.
  5. Now if the configure script crashes, we need to install the missing dependencies. We do this by using tools provided in apt. Every configure script will generate a file ending in .pc or .log when it errors: apt-file search nameoflogfile.pc will gather the missing dependencies.
  6. Install the missing dependencies with apt-get install missing-package-names where missing-package-names is the output from Step 5.
  7. Repeat Step 4.
  8. Now issue make && make install

You were missing Step 4.

Please also realize that from your question that Prog.pro is a QT Project file, which requires qmake. Qmake requires the QT Libraries, and by default the QT Libraries aren't installed. Adding them will result in extra menu items etc, because Unity is supported by the GTK Libraries. QT is most notably used for the K Desktop Environment, aka KDE, which means that the person who wrote this application intended it to be used in KDE, and NOT GNOME or Unity.

Update

You may need to run autogen script. If you don't see that, you need to redownload/reaquire the program. Programs are built using the Autotools Toolchain - Tutorial. See Also: WikiPedia Entry.


See Also: CompilingEasyHowTo

  • I am trying to do your instruction. you are right. I opened Prog.pro and it is written # Project created by QtCreator – Samira Afzal Jun 22 '16 at 19:39
  • The result of step4. is 'bash: ./configure: No such file or directory' – Samira Afzal Jun 22 '16 at 19:53
  • @golriz QTCreator is the IDE used to create mobile and possibly PC apps based on the QT Libraries. The paid version is now partly owned by Nokia, IIRC, and the OpenSource version is used in the sister application, KDevelop, the IDE used to create applications for KDE. If you're running a DE based on GTK, you need to ask whoever gave this to you if they have a copy based on GTK. – eyoung100 Jun 22 '16 at 19:57
  • For configure to work, you need to be in the proper directory. For my example that was /opt/ProgramName . If you are in that directory, you have 2 options. Complete Step 3, or start over. What is the output of ./configure --help? See my update for an example. – eyoung100 Jun 22 '16 at 20:03
  • "golriz@golriz-pc:/opt/ProgramName$ ./configure --help" the result: "bash: ./configure: No such file or directory" – Samira Afzal Jun 22 '16 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.