Need to update apcupsd, how?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
gene0915
Level 2
Level 2
Posts: 94
Joined: Sun Oct 26, 2014 7:52 pm

Need to update apcupsd, how?

Postby gene0915 » Sat Dec 02, 2017 11:38 pm

Using an APC UPS and I'm having this exact same problem: https://bugs.launchpad.net/ubuntu/+sour ... ug/1549576

In there, they talk about how I need to upgrade to version 3.14.14 (Mint has 3.14.12). Looks like I need to compile from source. Guessing I need to make sure the Linux kernel headers are installed first? Or, since I guess this version is in Yakkety, is there some way I can add that repo as a source and install it from there?

gene0915
Level 2
Level 2
Posts: 94
Joined: Sun Oct 26, 2014 7:52 pm

Re: Need to update apcupsd, how?

Postby gene0915 » Sun Dec 03, 2017 12:05 am

BTW, forgot to mention that I saw this post at the top: viewtopic.php?f=90&t=230142 (about compiling) but with my luck, I'm worried I screw something up and just want to take the easy way out....adding that Ubuntu repository. :) If not, tomorrow some time, I'll give compiling the 3.14.14 version a shot.

User avatar
phd21
Level 14
Level 14
Posts: 5244
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Need to update apcupsd, how?

Postby phd21 » Sun Dec 03, 2017 12:34 am

Hi "gene0915",

It is pretty easy to compile and install this newer version of APC UPS application "apcupsd" from their archive source code file "apcupsd-3.14.14.tar.gz". I just did this in my Linux Mint 18.2 system and it worked well.

Update: I just created an "apcupsd_3.14.14-2_amd64.deb" installation file for 64-bit computers using "checkinstall" from my just compiled and installed version of this. If you want to try this deb file, click link below, save the file, and double click to install it, OR compile it yourself using the instructions below.
https://my.pcloud.com/publink/show?code=XZ6Sx57ZF5ldyyqNHDhSOgoNV0jPe8b8mTLX

To compile APC UPS software (apcupsd) from source code:
Just download their file "apcupsd-3.14.14.tar.gz", right click it, select extract here, browse into the new "apcupsd-3.14.14" folder, right click anywhere in the whitespace and select "actions", then "open terminal here".

Install the basic compiling programs using the console terminal command below.
Open a console terminal, type in, or copy & paste, each line below one by one:
Click "Select All" above command, right click the highlighted command, select Copy (or Ctrl+Insert), click in the console terminal window, and right click paste (or Shift+Insert), repeat for each command.

Code: Select all

sudo apt install build-essential cmake extra-cmake-modules


To compile and install "apcupsd":
Open a console terminal, type in, or copy & paste, each line below one by one:
Click "Select All" above command, right click the highlighted command, select Copy (or Ctrl+Insert), click in the console terminal window, and right click paste (or Shift+Insert), repeat for each command.

Code: Select all

./configure

Code: Select all

make

Code: Select all

sudo make install


This is a good post on installing, configuring, and using the APC UPS software
UPS GUI software ? (SOLVED)
https://forums.linuxmint.com/viewtopic.php?t=252490


FYI: To run "apctest" (sudo apctest), the "apcupsd" service daemon must not be running.
To stop "apcupsd"

Code: Select all

sudo service apcupsd stop


To restart "apcupsd"

Code: Select all

sudo service apcupsd restart




Hope this helps ...
Last edited by phd21 on Sun Dec 03, 2017 1:15 pm, edited 3 times in total.
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

gene0915
Level 2
Level 2
Posts: 94
Joined: Sun Oct 26, 2014 7:52 pm

Re: Need to update apcupsd, how?

Postby gene0915 » Sun Dec 03, 2017 2:12 am

phd21 wrote:Hope this helps ...


Thank you so much!! I grabbed your .deb file and it installed but when I ran it, it bombed out and I got this error: "Most likely, you need to add --enable-usb to your ./configure opti" ..... so I went with your original instructions on how to compile it myself and added that parameter to the ./configure line and presto chango, ir'a working perfectly now!

Again, thank you so much!

User avatar
phd21
Level 14
Level 14
Posts: 5244
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Need to update apcupsd, how?

Postby phd21 » Sun Dec 03, 2017 2:57 am

Hi "gene0915",

You are most welcome.

FYI: That is the first time I ever created a Linux installation deb file from a software's compiled source code. It worked perfectly on my ancient computer system with an even more ancient APC UPS connected using the serial port not USB. I guess that is why I did not get that USB message. I'll try recompiling it again with that USB parameter.
Last edited by phd21 on Sun Dec 03, 2017 3:32 am, edited 1 time in total.
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
phd21
Level 14
Level 14
Posts: 5244
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Need to update apcupsd, how?

Postby phd21 » Sun Dec 03, 2017 3:30 am

Hi "gene0915",

I recompiled the "apcupsd" source code using the USB parameter "--enable-usb" and some other ones, then I recreated the Linux Deb file. Could you please download this and see if it will install on your system without any error messages? It is perfectly alright to reinstall it. Thank you.

Newly created Linux installation deb file for 64-bit computers for "apcupsd". I updated the previous link to this file as well.

apcupsd_3.14.14-2_amd64.deb
https://my.pcloud.com/publink/show?code=XZ6Sx57ZF5ldyyqNHDhSOgoNV0jPe8b8mTLX


...
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

gene0915
Level 2
Level 2
Posts: 94
Joined: Sun Oct 26, 2014 7:52 pm

Re: Need to update apcupsd, how?

Postby gene0915 » Wed Dec 06, 2017 4:04 pm

phd21 wrote:Hi "gene0915",

I recompiled the "apcupsd" source code using the USB parameter "--enable-usb" and some other ones, then I recreated the Linux Deb file. Could you please download this and see if it will install on your system without any error messages? It is perfectly alright to reinstall it. Thank you.

Newly created Linux installation deb file for 64-bit computers for "apcupsd". I updated the previous link to this file as well.

apcupsd_3.14.14-2_amd64.deb
https://my.pcloud.com/publink/show?code=XZ6Sx57ZF5ldyyqNHDhSOgoNV0jPe8b8mTLX


...


Crap, sorry for not writing sooner but that did the trick! Thank you!!

User avatar
phd21
Level 14
Level 14
Posts: 5244
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Need to update apcupsd, how?

Postby phd21 » Wed Dec 06, 2017 4:40 pm

Hi "gene0915",

You are welcome...

Glad to see that works too.
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde


Return to “Newbie Questions”