Installing appt through tar.gz

Discussion in 'Linux' started by dirk1965, Nov 26, 2008.

  1. dirk1965

    dirk1965

    Joined:
    Sep 14, 2008
    Messages:
    10
    Likes Received:
    0
    I don't know how you all learned all this but I seem to be unable to install anything that has a tar.gz extention. Tried installing powertop but again, no succes. It took me a while to notice that I installed version 1.10 and that the instructions below were for the previous 1.9 version but when I changed that in terminal it seemed at first to be working. Alas, no powertop on my AA1.
    This is what rolled out my terminal after typing the commands:
    :~/powertop-1.10$ make
    cc -O1 -g -Wall -W -Wshadow -c -o display.o display.c
    display.c:32:21: error: ncurses.h: No such file or directory
    display.c:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c: In function ‘cleanup_curses’:
    display.c:51: warning: implicit declaration of function ‘endwin’
    display.c: In function ‘zap_windows’:
    display.c:56: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:56: error: (Each undeclared identifier is reported only once
    display.c:56: error: for each function it appears in.)
    display.c:57: warning: implicit declaration of function ‘delwin’
    display.c:60: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:64: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:68: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c:72: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:76: error: ‘suggestion_window’ undeclared (first use in this function)
    display.c:80: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c: In function ‘setup_windows’:
    display.c:94: warning: implicit declaration of function ‘getmaxyx’
    display.c:94: error: ‘stdscr’ undeclared (first use in this function)
    display.c:98: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:98: warning: implicit declaration of function ‘subwin’
    display.c:99: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:100: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:101: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c:102: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:105: error: ‘suggestion_window’ undeclared (first use in this function)
    display.c:106: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c:111: warning: implicit declaration of function ‘werase’
    display.c:112: warning: implicit declaration of function ‘refresh’
    display.c: In function ‘initialize_curses’:
    display.c:117: warning: implicit declaration of function ‘initscr’
    display.c:118: warning: implicit declaration of function ‘start_color’
    display.c:119: warning: implicit declaration of function ‘keypad’
    display.c:119: error: ‘stdscr’ undeclared (first use in this function)
    display.c:119: error: ‘TRUE’ undeclared (first use in this function)
    display.c:120: warning: implicit declaration of function ‘nonl’
    display.c:121: warning: implicit declaration of function ‘cbreak’
    display.c:122: warning: implicit declaration of function ‘noecho’
    display.c:123: warning: implicit declaration of function ‘curs_set’
    display.c:124: warning: implicit declaration of function ‘use_default_colors’
    display.c:126: warning: implicit declaration of function ‘init_pair’
    display.c:126: error: ‘COLOR_WHITE’ undeclared (first use in this function)
    display.c:126: error: ‘COLOR_BLACK’ undeclared (first use in this function)
    display.c:128: error: ‘COLOR_RED’ undeclared (first use in this function)
    display.c:130: error: ‘COLOR_YELLOW’ undeclared (first use in this function)
    display.c:131: error: ‘COLOR_GREEN’ undeclared (first use in this function)
    display.c:132: error: ‘COLOR_BLUE’ undeclared (first use in this function)
    display.c: In function ‘show_title_bar’:
    display.c:142: warning: implicit declaration of function ‘wattrset’
    display.c:142: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:142: warning: implicit declaration of function ‘COLOR_PAIR’
    display.c:143: warning: implicit declaration of function ‘wbkgd’
    display.c:146: warning: implicit declaration of function ‘mvwprintw’
    display.c:148: warning: implicit declaration of function ‘wrefresh’
    display.c:150: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c:156: warning: implicit declaration of function ‘wattron’
    display.c:156: error: ‘A_REVERSE’ undeclared (first use in this function)
    display.c:158: warning: implicit declaration of function ‘wattroff’
    display.c: In function ‘show_cstates’:
    display.c:167: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:171: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_acpi_power_line’:
    display.c:198: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c: In function ‘show_wakeups’:
    display.c:216: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:231: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_timerstats’:
    display.c:239: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:247: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_suggestion’:
    display.c:275: error: ‘suggestion_window’ undeclared (first use in this function)
    make: *** [display.o] Error 1

    As one can see, a lot of error messages

    ~/powertop-1.10$ make install
    cc -O1 -g -Wall -W -Wshadow -c -o display.o display.c
    display.c:32:21: error: ncurses.h: No such file or directory
    display.c:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    display.c: In function ‘cleanup_curses’:
    display.c:51: warning: implicit declaration of function ‘endwin’
    display.c: In function ‘zap_windows’:
    display.c:56: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:56: error: (Each undeclared identifier is reported only once
    display.c:56: error: for each function it appears in.)
    display.c:57: warning: implicit declaration of function ‘delwin’
    display.c:60: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:64: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:68: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c:72: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:76: error: ‘suggestion_window’ undeclared (first use in this function)
    display.c:80: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c: In function ‘setup_windows’:
    display.c:94: warning: implicit declaration of function ‘getmaxyx’
    display.c:94: error: ‘stdscr’ undeclared (first use in this function)
    display.c:98: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:98: warning: implicit declaration of function ‘subwin’
    display.c:99: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:100: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:101: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c:102: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:105: error: ‘suggestion_window’ undeclared (first use in this function)
    display.c:106: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c:111: warning: implicit declaration of function ‘werase’
    display.c:112: warning: implicit declaration of function ‘refresh’
    display.c: In function ‘initialize_curses’:
    display.c:117: warning: implicit declaration of function ‘initscr’
    display.c:118: warning: implicit declaration of function ‘start_color’
    display.c:119: warning: implicit declaration of function ‘keypad’
    display.c:119: error: ‘stdscr’ undeclared (first use in this function)
    display.c:119: error: ‘TRUE’ undeclared (first use in this function)
    display.c:120: warning: implicit declaration of function ‘nonl’
    display.c:121: warning: implicit declaration of function ‘cbreak’
    display.c:122: warning: implicit declaration of function ‘noecho’
    display.c:123: warning: implicit declaration of function ‘curs_set’
    display.c:124: warning: implicit declaration of function ‘use_default_colors’
    display.c:126: warning: implicit declaration of function ‘init_pair’
    display.c:126: error: ‘COLOR_WHITE’ undeclared (first use in this function)
    display.c:126: error: ‘COLOR_BLACK’ undeclared (first use in this function)
    display.c:128: error: ‘COLOR_RED’ undeclared (first use in this function)
    display.c:130: error: ‘COLOR_YELLOW’ undeclared (first use in this function)
    display.c:131: error: ‘COLOR_GREEN’ undeclared (first use in this function)
    display.c:132: error: ‘COLOR_BLUE’ undeclared (first use in this function)
    display.c: In function ‘show_title_bar’:
    display.c:142: warning: implicit declaration of function ‘wattrset’
    display.c:142: error: ‘title_bar_window’ undeclared (first use in this function)
    display.c:142: warning: implicit declaration of function ‘COLOR_PAIR’
    display.c:143: warning: implicit declaration of function ‘wbkgd’
    display.c:146: warning: implicit declaration of function ‘mvwprintw’
    display.c:148: warning: implicit declaration of function ‘wrefresh’
    display.c:150: error: ‘status_bar_window’ undeclared (first use in this function)
    display.c:156: warning: implicit declaration of function ‘wattron’
    display.c:156: error: ‘A_REVERSE’ undeclared (first use in this function)
    display.c:158: warning: implicit declaration of function ‘wattroff’
    display.c: In function ‘show_cstates’:
    display.c:167: error: ‘cstate_window’ undeclared (first use in this function)
    display.c:171: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_acpi_power_line’:
    display.c:198: error: ‘acpi_power_window’ undeclared (first use in this function)
    display.c: In function ‘show_wakeups’:
    display.c:216: error: ‘wakeup_window’ undeclared (first use in this function)
    display.c:231: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_timerstats’:
    display.c:239: error: ‘timerstat_window’ undeclared (first use in this function)
    display.c:247: error: ‘A_BOLD’ undeclared (first use in this function)
    display.c: In function ‘show_suggestion’:
    display.c:275: error: ‘suggestion_window’ undeclared (first use in this function)
    make: *** [display.o] Error 1

    again error messages.

    Then when I type the command powertop I get the message that the command was not found. Can anyone tell me what I'm doing wrong here? I'm pretty new at Linux but very eager to learn.

    Thanks
     
    dirk1965, Nov 26, 2008
    #1
  2. dirk1965

    pienjo

    Joined:
    Oct 29, 2008
    Messages:
    20
    Likes Received:
    0
    Location:
    The Netherlands, Europe
    You need to have some development packages installed.

    Code:
    sudo apt-get install libncursesw5-dev libncursesw5
    will probably solve your problems.
     
    pienjo, Nov 27, 2008
    #2
  3. dirk1965

    2manydjs

    Joined:
    Jul 16, 2008
    Messages:
    300
    Likes Received:
    0
    What's the reason you don't use the binaries through the package manager to install powertop?
     
    2manydjs, Nov 28, 2008
    #3
  4. dirk1965

    RockDoctor

    Joined:
    Aug 21, 2008
    Messages:
    963
    Likes Received:
    0
    Location:
    Minnesota, USA
    Most applications for Linux systems that come in .tar.gz or .tar.bz2 files are source code packages. If you want to compile them youself you can, but your package manager won't be aware of them and they may break when you update a library file. As mentioned above, you'll need a bunch of development files. Unless you've got a compelling reason for compiling powertop (or any app) yourself, I recommend
    Code:
    sudo apt-get install powertop
     
    RockDoctor, Nov 29, 2008
    #4
  5. dirk1965

    blackest_knight

    Joined:
    Nov 13, 2008
    Messages:
    14
    Likes Received:
    0
    building from source can break things and it does tend to lead to having part of your system that need to be manually updated.

    However building from source is probably the only way to ge wifi and audio working properly on hardy (ignoring
    ndiswrapper for wifi of course).

    The more you compile your own stuff, the more likely it is that you will break something and have to do a reinstall but as its your pc it doesn't matter and its interesting.

    library's come in 3 flavors production dev and debug. the production libraries are what are normally used, a piece of software calls a function in a library and it gets executed. If your program needs to call a library function then the dev version is needed so the compiler can do its magic and find the function your program needs to call. The debug version is needed when your program crashes and your trying to find out where it all went wrong. We can probably ignore the debug versions at this stage. library's tend to grow over time as developers refine and extend them, so usually there is a minimum version which is required, that might not be on your system and then you need to go get the later version and ... well thats when you realise it was a step too far and you are way out of your depth :)

    by installing a deb file from the distro version your using then hopefully it will work as intended, other debs may not work if they depend on versions of other software not supplied on your distro version.

    some programs havent been packaged at all and thats when you build it yourself.
    To get a successful build you need the dev versions of the librarys needed. Look carefully at error messages from make to get a clue which dev version is missing.

    The essentials
    sudo apt-get install build-essential (the minimum needed you need more)
    make clean - clear out the object files created from previous makes usually needed when you upgraded something else
    ./configure - sometimes needed to create a make file that can work on your system.
    make - builds the object files (compiles source to object code and i think this is the stage the linker creates the executable files
    sudo make install - installs the program you compiled to your system.

    sudo checkinstall - can replace sudo make install. installs to your system and makes a .deb package file that can be installed to other systems or just saved to somewhere safe so when you wreck your system there is one less thing to compile.

    by making a deb file your package manager might be able to uninstall or upgrade the package later.

    if your going to build from source checkinstall is a very useful tool to have.

    Distributing your deb files
    probably not a good idea, someones liable to use it and come to you when it goes wrong, or something unrelated goes wrong and still blames your deb package. Seriously installing random deb packages is a bad idea you see how easy they are to make and you shouldnt trust them to not do something evil. Thats one reason why you use trusted repositories for installing software and software from a repository is usually tested enough to not to break on your system (often).

    If your new to Linux, your probably to new to want to be actively cutting away the safety net that a distro provides on the other hand provided you accept you will break things and realise its your fault ... have fun :)
     
    blackest_knight, Nov 29, 2008
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.