diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
index 2e64296..081b3fb 100644
--- a/Onboard/pypredict/lm/lm.cpp
+++ b/Onboard/pypredict/lm/lm.cpp
@@ -19,7 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <error.h>
+
 #include <algorithm>
 #include <cmath>
 #include <string>
@@ -37,7 +37,7 @@ StrConv::StrConv()
     if (cd_mb_wc == (iconv_t) -1)
     {
         if (errno == EINVAL)
-            error (0, 0, "conversion from UTF-8 to wchar_t not available");
+            fprintf (stderr, "conversion from UTF-8 to wchar_t not available");
         else
             perror ("iconv_open mb2wc");
     }
@@ -45,7 +45,7 @@ StrConv::StrConv()
     if (cd_wc_mb == (iconv_t) -1)
     {
         if (errno == EINVAL)
-            error (0, 0, "conversion from wchar_t to UTF-8 not available");
+            fprintf (stderr, "conversion from wchar_t to UTF-8 not available");
         else
             perror ("iconv_open wc2mb");
     }
diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
index 7c62824..da8cfd0 100644
--- a/Onboard/pypredict/lm/lm_dynamic.cpp
+++ b/Onboard/pypredict/lm/lm_dynamic.cpp
@@ -17,7 +17,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <error.h>
+
 
 #include "lm_dynamic.h"
 
@@ -91,7 +91,7 @@ LMError DynamicModelBase::load_arpac(const char* filename)
                     int ngrams_read = get_num_ngrams(current_level-1);
                     if (ngrams_read != ngrams_expected)
                     {
-                        error (0, 0, "unexpected n-gram count for level %d: "
+                        fprintf (stderr, "unexpected n-gram count for level %d: "
                                      "expected %d n-grams, but read %d",
                               current_level,
                               ngrams_expected, ngrams_read);
@@ -105,7 +105,7 @@ LMError DynamicModelBase::load_arpac(const char* filename)
                     if (ntoks < current_level+1)
                     {
                         err_code = ERR_NUMTOKENS; // too few tokens for cur. level
-                        error (0, 0, "too few tokens for n-gram level %d: "
+                        fprintf (stderr, "too few tokens for n-gram level %d: "
                               "line %d, tokens found %d/%d",
                               current_level,
                               line_number, ntoks, current_level+1);
