Trouble fixing or removing libmkl-dev

(I am running Pop OS which is similar to Ubuntu.)

I tried installing libmkl-dev:

sudo apt install libmkl-dev 

but it failed and the package manager is now broken. I have tried:

sudo dpkg --force-all -P libmkl-dev 

which results in:

dpkg: libmkl-dev:amd64: dependency problems, but removing anyway as you requested:  intel-mkl:amd64 depends on libmkl-dev (= 2019.2.187-1).  (Reading database ... 215038 files and directories currently installed.) Removing libmkl-dev:amd64 (2019.2.187-1) ... Purging configuration files for libmkl-dev:amd64 (2019.2.187-1) ... 

followed by:

sudo apt --fix-broken install 

which results in:

Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   libmkl-avx:i386 libmkl-avx2:i386 libmkl-avx512:i386 libmkl-computational-dev:i386   libmkl-core:i386 libmkl-gnu-thread:i386 libmkl-intel-thread:i386 libmkl-interface-dev:i386   libmkl-meta-computational:i386 libmkl-meta-interface:i386 libmkl-meta-threading:i386   libmkl-p4:i386 libmkl-p4m:i386 libmkl-p4m3:i386 libmkl-sequential:i386 libmkl-tbb-thread:i386   libmkl-threading-dev:i386 libmkl-vml-avx:i386 libmkl-vml-avx2:i386 libmkl-vml-avx512:i386   libmkl-vml-cmpt:i386 libmkl-vml-ia:i386 libmkl-vml-p4:i386 libmkl-vml-p4m:i386   libmkl-vml-p4m2:i386 libmkl-vml-p4m3:i386 libtbb-dev:i386 libtbb2:i386 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   libmkl-core:i386 libmkl-dev libmkl-meta-interface:i386 The following NEW packages will be installed:   libmkl-core:i386 libmkl-dev libmkl-meta-interface:i386 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. 5 not fully installed or removed. Need to get 0 B/6,519 kB of archives. After this operation, 39.5 MB of additional disk space will be used. Do you want to continue? [Y/n]  Preconfiguring packages ... (Reading database ... 214905 files and directories currently installed.) Preparing to unpack .../libmkl-core_2019.2.187-1_i386.deb ... Unpacking libmkl-core:i386 (2019.2.187-1) ... dpkg: error processing archive /var/cache/apt/archives/libmkl-core_2019.2.187-1_i386.deb (--unpack):  trying to overwrite shared '/usr/share/doc/libmkl-core/changelog.Debian.gz', which is different from other instances of package libmkl-core:i386 Preparing to unpack .../libmkl-meta-interface_2019.2.187-1_i386.deb ... Unpacking libmkl-meta-interface:i386 (2019.2.187-1) ... dpkg: error processing archive /var/cache/apt/archives/libmkl-meta-interface_2019.2.187-1_i386.deb (--unpack):  trying to overwrite shared '/usr/share/doc/libmkl-meta-interface/changelog.Debian.gz', which is different from other instances of package libmkl-meta-interface:i386 Selecting previously unselected package libmkl-dev:amd64. Preparing to unpack .../libmkl-dev_2019.2.187-1_amd64.deb ... Unpacking libmkl-dev:amd64 (2019.2.187-1) ... Errors were encountered while processing:  /var/cache/apt/archives/libmkl-core_2019.2.187-1_i386.deb  /var/cache/apt/archives/libmkl-meta-interface_2019.2.187-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

At present then, I’m stuck in a loop — unable to either install or uninstall libmkl-dev and the package manager is blocking any other actions until it is fixed.

I’d be happy to either successfully install libmkl or uninstall it and use a different library. Is there a path I can take to clean it out along with all its dependencies? Or do I have to manually remove all libmkl* packages or something like this?

Fixing “The startup disk cannot be partitioned or restored to a single partition” error on a fresh Mac OS installation

I’ve been working on this problem for over 10 hours. First of all, I installed Mojave using the Mojave patcher on an older MacBook. I completely erased my disk before installing Mojave. Here is the output of diskutil list:

    /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *1.0 TB     disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:          Apple_CoreStorage Local Disk              999.3 GB   disk0s2    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3  /dev/disk1 (internal, virtual):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:                  Apple_HFS Local Disk             +999.0 GB   disk1                                  Logical Volume on disk0s2                                  17B0E440-563B-4759-B442-CC8FE78F58DB                                  Unencrypted 

and sudo gpt -r show disk0:

       start        size  index  contents            0           1         PMBR            1           1         Pri GPT header            2          32         Pri GPT table           34           6                    40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B       409640  1951845952      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC   1952255592     1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC   1953525128           7            1953525135          32         Sec GPT table   1953525167           1         Sec GPT header  

Why am I still getting this error when I run boot camp assistant? I’ve already followed a guide that involved deleting any hidden Microsoft files in the EFI EFI partition. But I don’t think it really did anything because as I said, I completely erased this disk before installing Mojave. I’m at a complete loss here, and I’m desperate for help.

EDIT: I know this question has been asked before, but from what I can tell, no one has had this exact problem. On the posts I see involving this problem you can clearly see Microsoft partitions in the diskutil list. I have no visible Microsoft partitions. I performed a clean install. So I’m at a loss for why I keep getting the error.

Fixing storing a backup and adding items Python [on hold]

I’m trying to fix some methods such as “restore a backup” in my public library system.. But I’ve been stuck for weeks. Can someone help me out? The code is below, but it’s a lot. Not that complicated to read, I hope.

"""TODO: Done - filling the system with books from a file of books in JSON format (file with books).  You may add a fake ISBN number to book items and generate the number of book items per book. Done - filling the system with customers from a file of people ( file). Done - adding a book item. Done - adding a customer. Done - searching a book. Done - making a book loan. Done - making a backup of the system in JSON format. Not Done - restoring the system from a backup.  """   import json import csv  """     Created class 'Book' for adding a new book,     Returning the new dict() back to the class 'bookItems'     where it will be added to the bookcollection """  class Book:     @staticmethod     def createBook(FileBookcollection):         #parameters is for the inputUser. So it shows the right text for the user         parameters = ["author","country","imageLink","language","link","pages","title","year"]         newBook = dict()         for item in parameters:             inputUser = input("Fill in the " + item + " of the book: ")             if inputUser == "":                 newBook[item] = None             else:                 #adding the parameters as key and inputUser as value to the dict newBook                 newBook[item] = inputUser         #Adding ISBN to the Dict with a counter that counts the Len(Dict) + 1         newBook["ISBN"] = str(len(FileBookcollection) + 1)         return newBook   class bookItems:     def __init__(this,JSONFileBookCollection):         this.JSONFileBookCollection = JSONFileBookCollection         #Adding ISBN to the Dict with a counter that counts the Len(Dict) + 1         #every row has a unique ISBN in total list         numberCounter = 0         for book in JSONFileBookCollection:             numberCounter += 1             book["ISBN"] = str(numberCounter)      def createBook(this):         newBook = Book.createBook(this.JSONFileBookCollection)         this.JSONFileBookCollection.append(newBook)      """Method that will be called from the class 'Catalog' to show all the books"""     def getAllBooks(this):         return this.JSONFileBookCollection """     def restoreBooksBackup(this):         with open(r".\bookCollectionBackup.json") as jsonFile:             bookList = json.load(jsonFile)             this.JSONFileBookCollection = bookList """   class Catalog:     def __init__(this, dumbJSON):         this.dumbJSON = dumbJSON      def getAllBooks(this):         return this.dumbJSON.getAllBooks()      def showAllBooks(this):         for book in this.dumbJSON.getAllBooks():             for itemsBooks in book:                 print(itemsBooks," : ", book[itemsBooks])             print("\n--------------------------------------------------------------\n")      def getBookByLang(this):         booksByLang = []         userInput = input("What language is the book in?" )         for book in this.dumbJSON.getAllBooks():             if book["language"] == userInput:                 booksByLang.append(book)          for results in booksByLang:             print(results)      def getBooksByAuthor(this):         booksByAuthor = []         userInput = input("What author is the book from?")         for book in this.dumbJSON.getAllBooks():             if book["author"] == userInput:                 booksByAuthor.append(book)          for results in booksByAuthor:             print(results)      def getBooksByTitle(this):         booksByTitle = []         userInput = input("What's the title from the book?")         for book in this.dumbJSON.getAllBooks():             if book["title"] == userInput:                 booksByTitle.append(book)          for results in booksByTitle:             print(results)      def getBooksByISBN(this):         booksByISBN = []         userInput = input("What's the ISBN number?")         for book in this.dumbJSON.getAllBooks():             if book["ISBN"] == userInput:                 booksByISBN.append(book)          for results in booksByISBN:             print(results)      def restoreBooksBackup(this):         this.dumbJSON.restoreBooksBackup() """ """ class Person:     def __init__(this, personsList):         this.personsList = personsList      def addPerson(this):         parameters = ["Number", "Gender", "NameSet", "GivenName", "Surname", "StreetAddress", "ZipCode", "City", "EmailAddress", "Username", "TelephoneNumber"]         newPerson = list()         newCustomer = dict()         for item in parameters:             inputUser = input("Fill in the " + item + " of the customer: ")             if inputUser == "":                 newPerson.append(None)             else:                 newPerson.append(inputUser)         this.personsList.append(newPerson)      def getAllPersons(this):         return this.personsList      def restorePersonsListBackup(this):         with open(r".\backupFakeNames.csv","r") as output:             new_csv = csv.reader(output)             totalPersonListBackup = []             for line in new_csv:                 totalPersonListBackup.append(line)         this.personsList = totalPersonListBackup   class Customer:     def __init__(this, allPersonsInfo,userNames, CustomerList):         this.CustomerList = CustomerList         this.allPersonsInfo = allPersonsInfo         this.userNames = userNames           counter = 0         #Repeat itself 20 times but not sure how to debug that. It works for now but could be fixed later         for person in this.allPersonsInfo.getAllPersons():             this.CustomerList[userNames[counter]] = person             counter +=1      def getAllCustomers(this):         return this.CustomerList      def showAllPersonsInfo(this):         for username in this.userNames:             print(this.CustomerList[username])             print("\n")      def getAllPersonsInfo(this):         return this.allPersonsInfo.getAllPersons()      def getAllUserNames(this):         return this.userNames      def restorePersonsListBackup(this):         this.allPersonsInfo.restorePersonsListBackup()  class administration:     def __init__(this, bookCollection, AllCustomers, loanBookList):         this.AllCustomers = AllCustomers         this.bookCollection = bookCollection         this.loanBookList = loanBookList         this.allPersonsInfo = AllCustomers.getAllPersonsInfo()          for book in this.bookCollection.getAllBooks():             this.loanBookList[book["ISBN"]] = None      def setLoanBookPerson(this, isbnCode, customerUsername):         if customerUsername in this.AllCustomers.getAllUserNames():             if isbnCode in this.loanBookList.keys():                 if this.loanBookList[isbnCode] != None:                     print("This book is already used:")                 else:                     this.loanBookList[isbnCode] = customerUsername                     for book in this.bookCollection.getAllBooks():                         if book["ISBN"] == isbnCode:                             print(customerUsername,"loan book by title:",book["title"])             else:                 print("isbn code does not exist!")         else:             print("Username does not exist!")      def setLoanBookNobody(this, isbnCode):         if int(isbnCode) > len(this.loanBookList):             print("Wrong isbn code, type BookLoanedToPerson.showAllIsbnCodes() to check all the isbn codes ")         else:             this.loanBookList[isbnCode] = None      def showAllAvailableBooks(this):         for book in this.loanBookList:             if this.loanBookList[book] == None:                 print("\nThis book is available for loan: ", book)      def showAllIsbnCodes(this):         for code in this.loanBookList.keys():             print("isbn code: " + code)     def makeBackup(this):         with open(r".\backupFakeNames.csv","w",newline="") as output:             new_csv = csv.writer(output)             new_csv.writerows(this.allPersonsInfo)          with open(r".\bookCollectionBackup.json","w") as jsonFile:             json.dump(this.bookCollection.getAllBooks(),jsonFile)          with open(r".\loanbookListBackup.json","w") as jsonFile:             json.dump(this.loanBookList,jsonFile)      def restoreBackUp(this):         pass """         with open(r".\bookCollectionBackup.json") as jsonFile:             bookList = json.load(jsonFile)             this.bookCollection.dumbJSON.JSONFileBookCollection = bookList         with open(r".\backupFakeNames.csv","r") as output:             new_csv = csv.reader(output)             totalPersonListBackup = []             for line in new_csv:                 totalPersonListBackup.append(line)         this.AllCustomers.allPersonsInfo.personsList = totalPersonListBackup         #this.bookCollection.restoreBooksBackup()         with open(r".\loanbookListBackup.json") as jsonFile:             fileLoanBookBackup = json.load(jsonFile)         this.loanBookList = fileLoanBookBackup """  if __name__=="__main__":      reader = csv.reader(open('FakeNameSet20.csv', 'r'))     totalPersonList = []     userNameList = []     PreMadeCustomerDict = dict()      for line in reader:         userNameList.append(line[9])         totalPersonList.append(line)      """PersonalInfoAllpeople exist of list with list of all info over books """     PersonalInfoAllpeople = Person(totalPersonList)     CustomerList = Customer(PersonalInfoAllpeople, userNameList,PreMadeCustomerDict)      with open('booksset1.json') as jsonFile:         bookList = json.load(jsonFile)      bookCollection = bookItems(bookList)     booksCatalog = Catalog(bookCollection)      emptyDict = dict()     BookLoanedToPerson = administration(booksCatalog,CustomerList,emptyDict)      """-----------------------------------------------------------------------------------"""      #Examples of wrong input:     BookLoanedToPerson.setLoanBookPerson("200","kaas")     BookLoanedToPerson.setLoanBookPerson("200","Reech1950")     #Example of putting a ISBN code & username so that person will loan that book     BookLoanedToPerson.setLoanBookPerson("2","Reech1950")     #Example of person delivering book back. Where only the isbn code needs to be given     BookLoanedToPerson.setLoanBookNobody(2)     #Example of searching for a ISBN code. It will give a input where you need to fillin a correct isbn code     booksCatalog.getBooksByISBN()   """ How to add a new book to library: bookCollection.createBook() How to show all the books that is in posession of the library: booksCatalog.showAllBooks() How to show all Persons: CustomerList.showAllPersonsInfo() How to add a new customer: PersonalInfoAllpeople.addPerson() How to search for available books in the library: BookLoanedToPerson.showAllAvailableBooks() How to set certain book on loan: BookLoanedToPerson.setLoanBookPerson(isbn-code,Username) BookLoanedToPerson.setLoanBookPerson("1","Ancion") How to set a backup from all the data BookLoanedToPerson.makeBackup() How to show all the books that's by Language. booksCatalog.getBookByLang() How to show all the isbn codes: BookLoanedToPerson.showAllIsbnCodes() """  

Fixing broken update-motd.d folder and files on headless ubuntu ssh server

Short story I was trying to fix the
motd .d files so that they would display when booting up ssh on my android device and I used an online tutorial to try to fix them.

Now I am unable to test them by typing in run-parts /etc/update-motd.d because I keep on getting the following errors. run-parts: failed to exec /etc/update-motd.d/00-header:Exec format error

run-parts: /etc/update-motd.d/00-header exited with return code 1

run-parts: failed to exec /etc/update-motd.d/10-sysinfo: Exec format error

run-parts: /etc/update-motd.d/10-sysinfo exited with return code 1

run-parts: failed to exec /etc/update-motd.d/90-footer: Exec format error

run-parts: /etc/update-motd.d/90-footer exited with return code 1 .

Typing in systemctl status motd I get this on my screen

motd.service   Loaded: masked (/dev/null; bad)   Active: inactive (dead)   

Fixing identical Latitude/Longitude data for markers on maps (bug)

I have a Drupal 7 project that I want to add location information (latitudinal/longitudinal) to most of my content types. Currently I have noticed that if there are multiple nodes that are shown on a map and if any of those nodes have identical latitudinal/longitudinal data, then the map markers are overlaid on top of one another and only the top map marker is visible. The markers under the top most marker can’t be accessed (clicked to show data).

enter image description here

This essentially hides content, which is a type of bug, and if the content is hidden, most times you won’t realize it is a problem.

This becomes a serious problem when you are generating map data from address locations. The user can be very vague with their address, and simply put their country ie: “Mexico”. If other nodes are created with such vague data then the overlap problem occurs.

One was around this is to use the module “Google Map Field”, which allows the user to use a map with a map marker when creating or editing content to specify where the node is referring to. The lat/long data is generated behind the scenes. It is very hard to get duplicated lat/long data when selecting the location on a map with a map marker. One problem with this is that the “Google Map Field” also allows them to enter their location by address, (ie:Eugene, Oregon, USA), if they don’t want to do it with the map/marker. An admin can put a nice label on the field saying to only use the map/marker, and not put it in by address, but people often ignore instructions on labels.

We also need to have location (lat/long) data for Users “Profile2” profile. One problem with this is the “Google Map Field” does not work with Profile2, and gives a recursion error. The only way around this is to make the user put their lat/long data in by hand (not going to happen), or do it like we are currently doing it, where the user puts in their address and the lat/long data is calculated from that address. Again the problem where users can put in vague address location information and cause duplicate lat/long data that cause map marker obfuscation.

I have not seen any good solutions for this. I have thought of some custom solutions (some I don’t know are possible, and currently purely hypothetical)

1)For “Google Map Field” somehow disallow the inputting of the location information through the address textbox, thereby forcing them to enter their address information from the Map/Marker. I am not sure what best ways of doing this are…Change the available fields for the module manually? Find a different contributed module that allows you to deny certain fields for nodes being created or edited? (does such a module even exists?)

2) A possible solution would be to create a module that goes through the Drupal database and finds tables that have latitudinal/longitudinal coordinates that are attached to content types. The module would check for identical latitudinal/longitudinal coordinates that were identical and change their coordinates ever so slightly (like adding a one-one-hundredth of a degree to one of the identical coordinates, there by making them non identical. Experimenting with this manually, I was able to change one-one-thousandth of a degree to one lat/long row for identical location coordinates and this corresponded to about a 1 block change in location (thereby making the 2 markers have different locations on the map). If you set this module up to perform this calculation and data alteration every time cron is run then you would then solve your identical lat/long data problem.

One potential problem I have thought of is that we would like, in the end to have our profile2 profile data synchronize with our Salesforce data, and if that was the case, then if the Salesforce data was altered, it would synchronize with our Drupal data, and then the lat/long data could potentially overwrite our changes our custom module made, thereby adding identical lat/long data (sort of un-fixing our fix). If we did have our Profile2 data synchronizing with Salesforce (which would sync every cron run), I had considered finding a way to make sure our custom module was run AFTER the Drupal/Salesforce sync module ran.

I’m posting these hypothetical solutions to you, the Drupal community because it is possible that one of you have already solved this problem, and have just not posted anything about it, or you might have a strong opinion about one of these solutions, one way or another. It might be possible that you have encountered this problem, but had no solution, even hypothetical in mind, and this posting to this forum helps you in some way.

Please, I would love to hear alternative solutions, opinions about my hypothetical solutions, or thoughts in general about this identical location map marker overlay problem.

Sincerely,

David Pugh

I am having major issues fixing my dual boot, please help!

So this all started from attempting to clone my drive, and now I am just trying to get it back to normal… It was booting fine, grub was coming up with mint and windows 10 boot loader, now after me trying to fix the issue and reading a ton of forum posts, here is what my GRUB looks like – https://nimb.ws/CcltWh

Here is the last time I ran boot repair and it said it was successfull. https://nimb.ws/kWByNZ

and the link to the pastebin – http://paste.ubuntu.com/p/nDCXxphP2Y

I am trying to get everything back in working order because I still need to clone to a new drive… but thats what started this so im thinking maybe I should just start fresh with both..

EDIT- Figured this one out – Is there a way to download windows installation/repair USB on linux? as that is the only option that boots…

Thanks for any help i am desperate.

bonus question – If i do need to reinstall windows, what would be the surefire way to clone ubuntu to my new drive?

/sbin/fsck -fy not fixing the disk?

I am trying to fix a problem on my main disk.

  1. I restart in single user mode
  2. I type /sbin/fsck -fy or /sbin/fsck_apfs -fy /dev/disk1s1 and I get six error lines like this
disk valence check directory (old 0x7ddde39) orphan directory disk valence check directory (old 0x7ddde39) orphan directory disk valence check directory (old 0x7ddde39) orphan directory disk valence check directory (old 0x7ddde39) orphan directory disk valence check directory (old 0x7ddde39) orphan directory disk valence check directory (old 0x7ddde39) orphan directory 

the six lines are equal. Same directory.

fsck ends saying The disk appears to be ok.

I reboot the computer.

If I start the computer again in single user mode and repeat the command I receive again the same lines, same 0x7ddde39.

What is going on?

How do I fix that?

Fixing a ssh and sftp lockout

General problem: I got locked out from controlling my Ubuntu OS through sftp and ssh.

What caused the issue: A genious move by blindly following this tutorial: https://wisdmlabs.com/blog/create-an…ess-on-ubuntu/ What I was trying to do exactly is of small relevance, but in case you wish to know (even though I’m not asking for answers on this but rather the following) I wanted to create a limited access user.

The true issue here is that now I have no control over my remote Kimsufi Ubuntu installation.

My current linux/ubuntu knowledge: Obviously considerably poor.

Where I’m at right now: In order to regain control to an extent, I had to boot up Kimsufi’s OVH Rescue mode (Netboot>rescue64-pro). This apparantly installs a separate OS and gives me some provisional credentials. This allows me to view the machine’s HDD partitions with fdisk -l, but I know little more about what I can do from here.

Current exact problem: I just don’t know how to progress from here to regain my ssh connection. I presumably need to find the folder I messed up: “/etc/ssh/sshd_config”, edit it by removing the lines I added according to the tutorial, and restart ssh (hoping the service works fine again). I just don’t know how to move between partitions, find the file and edit it.

Fixing Omnigraffle Line Spacing

I was working on a document for my daughters with a 144pt Comic Sans font pasted from LibreOffice. When I closed out the document and returned to work on something else, the font stayed at 144pt Comic Sans… I set the font to Callibri 12pt, which is the new default, but the line spacing, geometry or something is a complete mess.

  • Restarting the application has made no difference.
  • Setting a new default template makes no difference.

There’s something basic I’m missing here. It’s not clear how to even adjust the line spacing much less fix the default.

  • How did the default change globally like this?
  • How can I fix this on a per-text basis?

enter image description here